Mailinglist Archive: yast-commit (819 mails)

< Previous Next >
[yast-commit] r54915 - in /branches/tmp/sh/tabbed-pkg-browsing/qt-pkg/src: YQPackageSelector.cc YQPkgFilterTab.cc
  • From: sh-sh-sh@xxxxxxxxxxxxxxxx
  • Date: Thu, 22 Jan 2009 15:49:36 -0000
  • Message-id: <E1LQ1oG-0003YX-Pl@xxxxxxxxxxxxxxxx>
Author: sh-sh-sh
Date: Thu Jan 22 16:49:36 2009
New Revision: 54915

URL: http://svn.opensuse.org/viewcvs/yast?rev=54915&view=rev
Log:
useable margins

Modified:
branches/tmp/sh/tabbed-pkg-browsing/qt-pkg/src/YQPackageSelector.cc
branches/tmp/sh/tabbed-pkg-browsing/qt-pkg/src/YQPkgFilterTab.cc

Modified: branches/tmp/sh/tabbed-pkg-browsing/qt-pkg/src/YQPackageSelector.cc
URL:
http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/tabbed-pkg-browsing/qt-pkg/src/YQPackageSelector.cc?rev=54915&r1=54914&r2=54915&view=diff
==============================================================================
--- branches/tmp/sh/tabbed-pkg-browsing/qt-pkg/src/YQPackageSelector.cc
(original)
+++ branches/tmp/sh/tabbed-pkg-browsing/qt-pkg/src/YQPackageSelector.cc Thu Jan
22 16:49:36 2009
@@ -27,6 +27,8 @@
#define ENABLE_SOURCE_RPMS 0
#define BRAINDEAD_LIB_NAMING_SCHEME 1
#define MARGIN 6 // around the
widget
+#define SPACING_BELOW_MENU_BAR 4
+#define SPLITTER_HALF_SPACING 4


#include <fstream>
@@ -219,11 +221,12 @@
YQPackageSelector::basicLayout()
{
QVBoxLayout *layout = new QVBoxLayout();
+ setLayout( layout );
layout->setContentsMargins( MARGIN, // left
0, // top
MARGIN, // right
MARGIN ); // bottom
- setLayout( layout );
+ layout->setSpacing( SPACING_BELOW_MENU_BAR );
layoutMenuBar( this );

_filters = new YQPkgFilterTab( this );
@@ -362,7 +365,10 @@
{
QVBoxLayout *layout = new QVBoxLayout( parent );
YUI_CHECK_NEW( layout );
- layout->setContentsMargins( 0, 0, 0, 0 );
+ layout->setContentsMargins( SPLITTER_HALF_SPACING, // left
+ 0, // top
+ 0, // right
+ 0 ); // bottom

QSplitter * splitter = new QSplitter( Qt::Vertical, parent );
YUI_CHECK_NEW( splitter );
@@ -497,7 +503,10 @@
YUI_CHECK_NEW( layout );

button_box->setLayout( layout );
- layout->setContentsMargins( 0, 0, 0, 0 );
+ layout->setContentsMargins( 2, // left
+ 2, // top
+ 2, // right
+ 2 ); // bottom

layout->addStretch();

@@ -528,7 +537,6 @@
{
_menuBar = new QMenuBar( parent );
YUI_CHECK_NEW( _menuBar );
-
parent->layout()->addWidget(_menuBar);

_fileMenu = 0;

Modified: branches/tmp/sh/tabbed-pkg-browsing/qt-pkg/src/YQPkgFilterTab.cc
URL:
http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/tabbed-pkg-browsing/qt-pkg/src/YQPkgFilterTab.cc?rev=54915&r1=54914&r2=54915&view=diff
==============================================================================
--- branches/tmp/sh/tabbed-pkg-browsing/qt-pkg/src/YQPkgFilterTab.cc (original)
+++ branches/tmp/sh/tabbed-pkg-browsing/qt-pkg/src/YQPkgFilterTab.cc Thu Jan 22
16:49:36 2009
@@ -31,10 +31,13 @@
#include "YQSignalBlocker.h"
#include "utf8.h"

-
using std::vector;
typedef vector<YQPkgFilterPage *> YQPkgFilterPageVector;

+#define MARGIN 5 // inner margin between 3D borders and content
+#define TOP_EXTRA_MARGIN 3
+#define SPLITTER_HALF_SPACING 2
+

struct YQPkgFilterTabPrivate
{
@@ -98,7 +101,7 @@
priv->leftPaneSplitter = new QSplitter( Qt::Vertical, priv->outerSplitter
);
YUI_CHECK_NEW( priv->leftPaneSplitter );

-
+
//
// Left pane content
//
@@ -145,6 +148,22 @@

connect( tabBar(), SIGNAL( currentChanged( int ) ),
this, SLOT ( showPage ( int ) ) );
+
+ //
+ // Cosmetics
+ //
+
+ priv->baseClassWidgetStack->setContentsMargins( MARGIN,
// left
+ MARGIN + TOP_EXTRA_MARGIN,
// top
+ MARGIN,
// right
+ MARGIN );
// bottom
+
+ priv->leftPaneSplitter->setContentsMargins ( 0,
// left
+ 0,
// top
+ SPLITTER_HALF_SPACING,
// right
+ 0 );
// bottom
+
+ // priv->rightPane->setContentsMargins() is set when widgets are added to
the right pane
}



--
To unsubscribe, e-mail: yast-commit+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: yast-commit+help@xxxxxxxxxxxx

< Previous Next >
This Thread
  • No further messages