[yast-commit] r42629 - in /branches/tmp/coolo/qt4-port: src/ theme/
Author: coolo Date: Mon Dec 3 17:55:25 2007 New Revision: 42629 URL: http://svn.opensuse.org/viewcvs/yast?rev=42629&view=rev Log: merging in the first half of the branch - not compiling right now Added: branches/tmp/coolo/qt4-port/src/QHelpDialog.ui - copied unchanged from r42499, branches/tmp/coolo/wizard-rework/src/QHelpDialog.ui branches/tmp/coolo/qt4-port/theme/ - copied from r42493, branches/tmp/coolo/wizard-rework/theme/ branches/tmp/coolo/qt4-port/theme/background-1024x768.png - copied unchanged from r42500, branches/tmp/coolo/wizard-rework/theme/background-1024x768.png branches/tmp/coolo/qt4-port/theme/bottom-gradient.png - copied unchanged from r42493, branches/tmp/coolo/wizard-rework/theme/bottom-gradient.png branches/tmp/coolo/qt4-port/theme/step-current.png - copied unchanged from r42493, branches/tmp/coolo/wizard-rework/theme/step-current.png branches/tmp/coolo/qt4-port/theme/step-done.png - copied unchanged from r42493, branches/tmp/coolo/wizard-rework/theme/step-done.png branches/tmp/coolo/qt4-port/theme/step-todo.png - copied unchanged from r42493, branches/tmp/coolo/wizard-rework/theme/step-todo.png branches/tmp/coolo/qt4-port/theme/steps-button.png - copied unchanged from r42493, branches/tmp/coolo/wizard-rework/theme/steps-button.png branches/tmp/coolo/qt4-port/theme/style.qss - copied, changed from r42493, branches/tmp/coolo/wizard-rework/theme/style.qss Modified: branches/tmp/coolo/qt4-port/src/CMakeLists.txt branches/tmp/coolo/qt4-port/src/YQUI.h branches/tmp/coolo/qt4-port/src/YQUI_core.cc branches/tmp/coolo/qt4-port/src/YQWizard.cc branches/tmp/coolo/qt4-port/src/YQWizard.h Modified: branches/tmp/coolo/qt4-port/src/CMakeLists.txt URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/coolo/qt4-port/src/CMakeLists.txt?rev=42629&r1=42628&r2=42629&view=diff ============================================================================== --- branches/tmp/coolo/qt4-port/src/CMakeLists.txt (original) +++ branches/tmp/coolo/qt4-port/src/CMakeLists.txt Mon Dec 3 17:55:25 2007 @@ -31,6 +31,8 @@ QT4_AUTOMOC(${qt4_yast_plugin_SRCS}) +QT4_WRAP_UI(qt4_yast_plugin_SRCS QHelpDialog.ui) + INCLUDE_DIRECTORIES( ${QT_INCLUDES} ) INCLUDE_DIRECTORIES( ${YAST_INCLUDE_DIR} ) INCLUDE_DIRECTORIES( ${YAST_INCLUDE_DIR}/yui ) @@ -47,8 +49,7 @@ INSTALL(TARGETS py2qt4 LIBRARY DESTINATION ${YAST_PLUGIN_DIR} ) -ADD_SUBDIRECTORY(pkg) - +#ADD_SUBDIRECTORY(pkg) #SET_TARGET_PROPERTIES( y2lang_qt4 PROPERTIES PREFIX "" ) Modified: branches/tmp/coolo/qt4-port/src/YQUI.h URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/coolo/qt4-port/src/YQUI.h?rev=42629&r1=42628&r2=42629&view=diff ============================================================================== --- branches/tmp/coolo/qt4-port/src/YQUI.h (original) +++ branches/tmp/coolo/qt4-port/src/YQUI.h Mon Dec 3 17:55:25 2007 @@ -565,7 +565,7 @@ * argument, so this needs to be embedded into something else - and a QVBox * at least handles all the sizeHint and resize stuff. **/ - QFrame * _main_win; + QWidget * _main_win; /** * Stack for the Qt widgets inside the main window. Modified: branches/tmp/coolo/qt4-port/src/YQUI_core.cc URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/coolo/qt4-port/src/YQUI_core.cc?rev=42629&r1=42628&r2=42629&view=diff ============================================================================== --- branches/tmp/coolo/qt4-port/src/YQUI_core.cc (original) +++ branches/tmp/coolo/qt4-port/src/YQUI_core.cc Mon Dec 3 17:55:25 2007 @@ -26,6 +26,7 @@ #include <QStackedWidget> #include <QDesktopWidget> #include <QThread> +#include <QVBoxLayout> #include <ycp/YCPTerm.h> #include <ycp/YCPCode.h> @@ -135,13 +136,17 @@ wflags |= Qt::FramelessWindowHint; } - _main_win = new Q3VBox( 0, 0, wflags ); // parent, name, wflags + _main_win = new QWidget( 0, 0, wflags ); // parent, name, wflags _main_win->setFocusPolicy( Qt::StrongFocus ); // Create widget stack for `opt(`defaultsize) dialogs + QVBoxLayout *vbox = new QVBoxLayout( _main_win ); + vbox->setSpacing( 0 ); + vbox->setMargin( 0 ); _widget_stack = new QStackedWidget( _main_win ); _widget_stack->setFocusPolicy( Qt::StrongFocus ); + vbox->addWidget( _widget_stack ); #if 0 _main_win->installEventFilter( this ); #endif Modified: branches/tmp/coolo/qt4-port/src/YQWizard.cc URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/coolo/qt4-port/src/YQWizard.cc?rev=42629&r1=42628&r2=42629&view=diff ============================================================================== --- branches/tmp/coolo/qt4-port/src/YQWizard.cc (original) +++ branches/tmp/coolo/qt4-port/src/YQWizard.cc Mon Dec 3 17:55:25 2007 @@ -29,6 +29,8 @@ #include <string> #include <YShortcut.h> +#include <QDialog> +#include "ui_QHelpDialog.h" #include <q3hbox.h> #include <q3header.h> #include <qimage.h> @@ -81,33 +83,6 @@ #define TEXTDOMAIN "packages-qt" -#define ENABLE_GRADIENTS 1 - -#define USE_SEPARATOR 1 - -#define WORK_AREA_TOP_MARGIN 10 - -#if ENABLE_GRADIENTS -# define WORK_AREA_BOTTOM_MARGIN 8 -# define WORK_AREA_RIGHT_MARGIN 8 -#else -# define WORK_AREA_BOTTOM_MARGIN 8 -# define WORK_AREA_RIGHT_MARGIN 6 -#endif - -#define BUTTON_BOX_TOP_MARGIN 10 - -#define SEPARATOR_MARGIN 6 -#define STEPS_MARGIN 10 -#define STEPS_SPACING 2 -#define STEPS_HEADING_SPACING 8 -#define MENU_BAR_MARGIN 8 - -#define USE_FIXED_STEP_FONTS 0 -#define STEPS_FONT_FAMILY "Sans Serif" -#define STEPS_FONT_SIZE 11 -#define STEPS_HEADING_FONT_SIZE 11 - #define USE_ICON_ON_HELP_BUTTON 0 @@ -126,10 +101,9 @@ , _abortButtonLabel( abortButtonLabel ) , _nextButtonLabel( nextButtonLabel ) { - QVBoxLayout* layout = new QVBoxLayout( this ); + QHBoxLayout* layout = new QHBoxLayout( this ); layout->setSpacing( 0 ); layout->setMargin( 0 ); - setLayout( layout ); setWidgetRep( this ); @@ -141,24 +115,18 @@ _sideBar = 0; _stepsPanel = 0; - _stepsBox = 0; - _stepsGrid = 0; _helpButton = 0; _stepsButton = 0; _treeButton = 0; _releaseNotesButton = 0; _treePanel = 0; _tree = 0; - _helpPanel = 0; - _helpBrowser = 0; _clientArea = 0; - _menuBarBox = 0; _menuBar = 0; _dialogIcon = 0; _dialogHeading = 0; _contents = 0; _backButton = 0; - _backButtonSpacer = 0; _abortButton = 0; _nextButton = 0; _sendButtonEvents = true; @@ -169,46 +137,10 @@ YQUI::setTextdomain( TEXTDOMAIN ); + //layoutTitleBar( this ); - // - // Load graphics - // - -#if ENABLE_GRADIENTS - loadGradientPixmaps(); -#endif - - if ( _stepsEnabled ) - loadStepsIcons(); - - - // - // Create widgets - // - - - if ( ! _titleBarGradientPixmap.isNull() ) - { - layoutTitleBar( this ); - } - else - { - QWidget * spacer = addVSpacing( this, WORK_AREA_TOP_MARGIN ); - Q_CHECK_PTR( spacer ); - -# if ENABLE_GRADIENTS - spacer->setPaletteBackgroundColor( _gradientTopColor ); -# endif - } - - Q3HBox * hBox = new Q3HBox( this ); - YUI_CHECK_NEW( hBox ); - layout->addWidget( hBox ); - - layoutSideBar( hBox ); - layoutWorkArea( hBox ); - - y2debug( "Constructor finished." ); + layout->addLayout( layoutSideBar( this ) ); + layout->addLayout( layoutWorkArea( this ) ); } @@ -222,22 +154,9 @@ void YQWizard::layoutTitleBar( QWidget * parent ) { - if ( ! highColorDisplay() ) // 8 bit display or worse? - { - // No colorful title bar, just a spacing to match the one at the bottom. - addVSpacing( parent, WORK_AREA_BOTTOM_MARGIN ); - - return; - } - - Q3HBox * titleBar = new Q3HBox( parent ); YUI_CHECK_NEW( titleBar ); -#if ENABLE_GRADIENTS - setGradient( titleBar, _titleBarGradientPixmap ); -#endif - titleBar->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) ); // hor/vert // @@ -283,7 +202,7 @@ -void YQWizard::layoutSideBar( QWidget * parent ) +QLayout *YQWizard::layoutSideBar( QWidget * parent ) { _sideBar = new Q3WidgetStack( parent ); YUI_CHECK_NEW( _sideBar ); @@ -291,6 +210,8 @@ _sideBar->setSizePolicy( QSizePolicy( QSizePolicy::Fixed, QSizePolicy::Preferred ) ); // hor/vert _sideBar->setMargin( 0 ); + QVBoxLayout *vbox = new QVBoxLayout( ); + vbox->addWidget( _sideBar ); layoutHelpPanel(); @@ -304,101 +225,29 @@ layoutStepsPanel(); showSteps(); } -} - + return vbox; +} void YQWizard::layoutStepsPanel() { - _stepsPanel = new Q3VBox( _sideBar ); - YUI_CHECK_NEW( _stepsPanel ); - - -#if ENABLE_GRADIENTS - if ( ! _titleBarGradientPixmap.isNull() ) - { - // Top gradient - - QLabel * topGradient = new QLabel( _stepsPanel ); - Q_CHECK_PTR( topGradient ); - setGradient( topGradient, _topGradientPixmap ); - } -#endif - - // Steps - + _stepsPanel = new QWidget( _sideBar ); _sideBar->addWidget( _stepsPanel ); - _stepsBox = new Q3VBox( _stepsPanel ); - YUI_CHECK_NEW( _stepsBox ); -#if ENABLE_GRADIENTS - _stepsBox->setPaletteBackgroundColor( _gradientCenterColor ); -#endif - _stepsBox->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Preferred ) ); // hor/vert - - QWidget * stretch = addVStretch( _stepsPanel ); - YUI_CHECK_NEW( stretch ); -#if ENABLE_GRADIENTS - stretch->setPaletteBackgroundColor( _gradientCenterColor ); -#endif - - // Steps panel bottom buttons ("Help", "Release Notes") - QLabel * helpButtonBox = new QLabel( _stepsPanel ); - -#if ENABLE_GRADIENTS - YUI_CHECK_NEW( helpButtonBox ); - setGradient( helpButtonBox, _bottomGradientPixmap ); -#endif - - - // Layouts for the buttons - QVBoxLayout * vbox = new QVBoxLayout( helpButtonBox, 0, 0 ); // parent, margin, spacing - YUI_CHECK_NEW( vbox ); - vbox->addStretch( 99 ); - - - QHBoxLayout * hbox = new QHBoxLayout( vbox, 0 ); // parent, spacing - hbox->addStretch( 99 ); - - _releaseNotesButton = new QPushButton( _( "Release Notes..." ), helpButtonBox ); - hbox->addWidget( _releaseNotesButton ); - + _releaseNotesButton = new QPushButton( _( "Release Notes..." ), _stepsPanel ); + _releaseNotesButton->setSizePolicy( QSizePolicy( QSizePolicy::Preferred, QSizePolicy::Minimum ) ); // hor/vert connect( _releaseNotesButton, SIGNAL( clicked() ), this, SLOT ( releaseNotesClicked() ) ); _releaseNotesButton->hide(); // hidden until showReleaseNotesButton() is called - hbox->addStretch( 99 ); - vbox->addStretch( 99 ); - - hbox = new QHBoxLayout( vbox, 0 ); // parent, spacing - hbox->addStretch( 99 ); - - // Help button - intentionally without keyboard shortcut - _helpButton = new QPushButton( _( "Help" ), helpButtonBox ); - YUI_CHECK_NEW( _helpButton ); - - hbox->addWidget( _helpButton ); - hbox->addStretch( 99 ); - - connect( _helpButton, SIGNAL( clicked() ), - this, SLOT ( showHelp() ) ); - -#if USE_ICON_ON_HELP_BUTTON - QPixmap pixmap = QPixmap( PIXMAP_DIR "help-button.png" ); - - if ( ! pixmap.isNull() ) - _helpButton->setPixmap( pixmap ); -#endif - - - vbox->addSpacing( WORK_AREA_BOTTOM_MARGIN ); + _stepsDirty = true; // no layout yet } @@ -447,66 +296,25 @@ void YQWizard::updateSteps() { - if ( ! _stepsBox ) + if ( ! _stepsPanel ) return; - // - // Delete any previous step widgets - // - - if ( _stepsGrid ) - { - delete _stepsGrid->mainWidget(); - _stepsGrid = 0; - } - - - // - // Create a new parent widget for the steps - // - - QWidget * stepsParent = new QWidget( _stepsBox ); - YUI_CHECK_NEW( stepsParent ); - stepsParent->setSizePolicy( QSizePolicy( QSizePolicy::Preferred, QSizePolicy::Preferred ) ); // hor/vert -#if ENABLE_GRADIENTS - stepsParent->setPaletteBackgroundColor( _gradientCenterColor ); -#endif - // Create a grid layout for the steps + QVBoxLayout *_stepsVBox = new QVBoxLayout( _stepsPanel ); - _stepsGrid = new QGridLayout(stepsParent); - //_stepsList.count(), 4, // rows, cols - _stepsGrid->setMargin(0); - _stepsGrid->setSpacing(STEPS_SPACING); + QGridLayout *_stepsGrid = new QGridLayout( ); YUI_CHECK_NEW( _stepsGrid ); + _stepsVBox->addLayout( _stepsGrid ); + _stepsGrid->setColumnMinimumWidth( 0, 10 ); + _stepsGrid->setRowStretch( 0, 1 ); + _stepsGrid->setRowStretch( 1, 1 ); + _stepsGrid->setRowStretch( 2, 99 ); const int statusCol = 1; const int nameCol = 2; - _stepsGrid->setColStretch( 0, 99 ); // Left margin column - stretch - _stepsGrid->setColStretch( statusCol, 0 ); // Status column - don't stretch - _stepsGrid->setColStretch( nameCol, 0 ); // Name column - don't stretch - _stepsGrid->setColStretch( 3, 99 ); // Left margin column - stretch - - - // Work around Qt bug: Grid layout only works right if the parent widget isn't visible. - stepsParent->hide(); - - // - // Add left and right (but not top and bottom) margins - // - int row = 0; - QWidget * leftSpacer = addHSpacing( stepsParent, STEPS_MARGIN ); - YUI_CHECK_NEW( leftSpacer ); - _stepsGrid->addWidget( leftSpacer, row, 0 ); - - QWidget * rightSpacer = addHSpacing( stepsParent, STEPS_MARGIN ); - YUI_CHECK_NEW( rightSpacer ); - _stepsGrid->addWidget( rightSpacer, row, 3 ); - - // // Create widgets for all steps and step headings in the internal list // @@ -517,38 +325,14 @@ { if ( step->isHeading() ) { - if ( row > 0 ) - { - // Spacing - - QWidget * spacer = addVSpacing( stepsParent, STEPS_HEADING_SPACING ); - YUI_CHECK_NEW( spacer ); - _stepsGrid->addWidget( spacer, row++, nameCol ); - } - // // Heading // - QLabel * label = new QLabel( step->name(), stepsParent ); + QLabel * label = new QLabel( step->name(), _stepsPanel ); YUI_CHECK_NEW( label ); label->setAlignment( Qt::AlignLeft | Qt::AlignTop ); - -#if USE_FIXED_STEP_FONTS - QFont font( STEPS_FONT_FAMILY, STEPS_HEADING_FONT_SIZE ); - font.setWeight( QFont::Bold ); - label->setFont( font ); -#else - QFont font = YQUI::yqApp()->currentFont(); - - int size = font.pointSize(); - - if ( size > 1 ) - font.setPointSize( size + 2 ); - - font.setBold( true ); - label->setFont( font ); -#endif + label->setProperty( "class", "steps_heading" ); step->setNameLabel( label ); _stepsGrid->addMultiCellWidget( label, @@ -561,27 +345,21 @@ // Step status // - QLabel * statusLabel = new QLabel( stepsParent ); + QLabel * statusLabel = new QLabel( _stepsPanel ); YUI_CHECK_NEW( statusLabel ); step->setStatusLabel( statusLabel ); + statusLabel->setSizePolicy( QSizePolicy::Minimum, QSizePolicy::Minimum ); _stepsGrid->addWidget( statusLabel, row, statusCol ); - // // Step name // - QLabel * nameLabel = new QLabel( step->name(), stepsParent ); + QLabel * nameLabel = new QLabel( step->name(), _stepsPanel ); YUI_CHECK_NEW( nameLabel ); nameLabel->setAlignment( Qt::AlignLeft | Qt::AlignTop ); -#if USE_FIXED_STEP_FONTS - nameLabel->setFont( QFont( STEPS_FONT_FAMILY, STEPS_FONT_SIZE ) ); -#else - nameLabel->setFont( YQUI::yqApp()->currentFont() ); -#endif - step->setNameLabel( nameLabel ); _stepsGrid->addWidget( nameLabel, row, nameCol ); } @@ -590,8 +368,13 @@ row++; } - _stepsGrid->activate(); - stepsParent->show(); + _stepsVBox->addStretch( 99 ); + QVBoxLayout *rbl = new QVBoxLayout(); + rbl->addWidget( _releaseNotesButton, 0, Qt::AlignCenter ); + + _stepsVBox->addLayout( rbl ); + _stepsVBox->addStretch( 29 ); + _stepsDirty = false; } @@ -607,8 +390,7 @@ if ( currentStep ) { // Set status icon and color for the current step - setStepStatus( currentStep, _stepCurrentIcon, _stepCurrentColor ); - + currentStep->setStatus( Step::Current ); // // Set all steps before the current to "done" @@ -616,7 +398,7 @@ while ( step && step != currentStep ) { - setStepStatus( step, _stepDoneIcon, _stepDoneColor ); + step->setStatus( Step::Done ); step = _stepsList.next(); } @@ -632,25 +414,11 @@ while ( step ) { - setStepStatus( step, _stepToDoIcon, _stepToDoColor ); + step->setStatus( Step::Todo ); step = _stepsList.next(); } } - -void YQWizard::setStepStatus( YQWizard::Step * step, const QPixmap & icon, const QColor & color ) -{ - if ( step ) - { - if ( step->nameLabel() ) - step->nameLabel()->setPaletteForegroundColor( color ); - - if ( step->statusLabel() ) - step->statusLabel()->setPixmap( icon ); - } -} - - void YQWizard::setCurrentStep( const string & id ) { _currentStepID = fromUTF8( id ); @@ -676,52 +444,11 @@ void YQWizard::layoutHelpPanel() { - _helpPanel = new Q3HBox( _sideBar ); - YUI_CHECK_NEW( _helpPanel ); - _sideBar->addWidget( _helpPanel ); - - addGradientColumn( _helpPanel ); - - Q3VBox * vbox = new Q3VBox( _helpPanel ); - YUI_CHECK_NEW( vbox ); - - - // Help browser - - _helpBrowser = new Q3TextBrowser( vbox ); - YUI_CHECK_NEW( _helpBrowser ); - - _helpBrowser->setMimeSourceFactory( 0 ); - _helpBrowser->installEventFilter( this ); - _helpBrowser->setTextFormat( Qt::RichText ); - _helpBrowser->setMargin( 4 ); - _helpBrowser->setResizePolicy( Q3ScrollView::Manual ); - - - // Set help browser text color - QPixmap fgPixmap = QPixmap( PIXMAP_DIR "help-text-color.png" ); - if (! fgPixmap.isNull() ) - _helpBrowser->setPaletteForegroundColor( pixelColor( fgPixmap, 0, 0, paletteForegroundColor() ) ); - - - if ( highColorDisplay() ) - { - // Set fancy help browser background pixmap - - QPixmap bgPixmap( PIXMAP_DIR "help-background.png" ); - - if ( ! bgPixmap.isNull() ) - _helpBrowser->setPaletteBackgroundPixmap( bgPixmap ); - } - - - // // Button box with bottom gradient // - - QLabel * buttonBox = new QLabel( vbox ); + QLabel * buttonBox = new QLabel( _sideBar ); YUI_CHECK_NEW( buttonBox ); QPushButton * button; @@ -734,9 +461,7 @@ YUI_CHECK_NEW( button ); _treeButton = button; -#if USE_ICON_ON_HELP_BUTTON pixmap = QPixmap( PIXMAP_DIR "tree-button.png" ); -#endif } else if ( _stepsEnabled ) @@ -746,9 +471,7 @@ YUI_CHECK_NEW( button ); _stepsButton = button; -#if USE_ICON_ON_HELP_BUTTON pixmap = QPixmap( PIXMAP_DIR "steps-button.png" ); -#endif } else { @@ -758,8 +481,10 @@ } +#if USE_ICON_ON_HELP_BUTTON if ( ! pixmap.isNull() ) button->setPixmap( pixmap ); +#endif layoutSideBarButtonBox( buttonBox, button ); @@ -778,8 +503,6 @@ // Hide the dummy button - the button box height is fixed now. button->hide(); } - - addGradientColumn( _helpPanel ); } @@ -788,7 +511,6 @@ { QVBoxLayout * vbox = new QVBoxLayout( parent, 0, 0 ); // parent, margin, spacing YUI_CHECK_NEW( vbox ); - vbox->addSpacing( BUTTON_BOX_TOP_MARGIN ); QHBoxLayout * hbox = new QHBoxLayout( vbox, 0 ); // parent, spacing YUI_CHECK_NEW( hbox ); @@ -796,19 +518,6 @@ hbox->addStretch( 99 ); hbox->addWidget( button ); hbox->addStretch( 99 ); - - vbox->addSpacing( WORK_AREA_BOTTOM_MARGIN ); - - // For whatever strange reason, parent->sizeHint() does not return anything - // meaningful yet - not even after vbox->activate() or parent->adjustSize() - int height = button->sizeHint().height() + BUTTON_BOX_TOP_MARGIN + WORK_AREA_BOTTOM_MARGIN; - -#if ENABLE_GRADIENTS - if ( ! _bottomGradientPixmap.isNull() ) - setBottomCroppedGradient( parent, _bottomGradientPixmap, height ); -#endif - - parent->setFixedHeight( height ); } @@ -819,9 +528,6 @@ YUI_CHECK_NEW( _treePanel ); _sideBar->addWidget( _treePanel ); - // Left margin (with gradients) - addGradientColumn( _treePanel ); - Q3VBox * vbox = new Q3VBox( _treePanel ); YUI_CHECK_NEW( vbox ); @@ -870,9 +576,6 @@ connect( button, SIGNAL( clicked() ), this, SLOT ( showHelp() ) ); - - // Right margin (with gradients) - addGradientColumn( _treePanel ); } @@ -987,100 +690,53 @@ -void YQWizard::layoutWorkArea( QFrame * parentHBox ) +QLayout *YQWizard::layoutWorkArea( QFrame * parent ) { - Q3VBox * workAreaVBox = new Q3VBox( parentHBox ); - YUI_CHECK_NEW( workAreaVBox ); - - // An extra QVBox inside the workAreaVBox is needed for frame and margin - - Q3VBox * workArea = new Q3VBox( workAreaVBox ); - YUI_CHECK_NEW( workArea ); - -#if ENABLE_GRADIENTS - workArea->setFrameStyle( QFrame::Box | QFrame::Plain ); - workArea->setMargin( 4 ); -#else - workArea->setFrameStyle( QFrame::Box | QFrame::Sunken ); - // workArea->setFrameStyle( QFrame::TabWidgetPanel | QFrame::Sunken ); -#endif - + QVBoxLayout *vbox = new QVBoxLayout(); - // - // Menu bar - // - - // Placed directly inside workArea the menu bar positions itself at (0,0) - // and so obscures any kind of frame there might be. - _menuBarBox = new Q3VBox( workArea ); - YUI_CHECK_NEW( _menuBarBox ); - - _menuBar = new QMenuBar( _menuBarBox ); + _menuBar = new QMenuBar( parent ); YUI_CHECK_NEW( _menuBar ); - _menuBarBox->hide(); // will be made visible when menus are added - + _menuBar->hide(); // will be made visible when menus are added + vbox->addWidget( _menuBar ); // // Dialog icon and heading // - Q3HBox * headingHBox = new Q3HBox( workArea ); + QHBoxLayout * headingHBox = new QHBoxLayout(); YUI_CHECK_NEW( headingHBox ); - headingHBox->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Minimum ) ); // hor/vert - - addHSpacing( headingHBox, SEPARATOR_MARGIN ); + //headingHBox->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Minimum ) ); // hor/vert + vbox->addLayout( headingHBox ); - _dialogIcon = new QLabel( headingHBox ); + _dialogIcon = new QLabel( parent ); YUI_CHECK_NEW( _dialogIcon ); + headingHBox->addWidget( _dialogIcon ); _dialogIcon->setSizePolicy( QSizePolicy( QSizePolicy::Minimum, QSizePolicy::Minimum ) ); // hor/vert + _dialogIcon->setObjectName( "DialogIcon" ); - addHSpacing( headingHBox ); - - _dialogHeading = new QLabel( headingHBox ); + _dialogHeading = new QLabel( parent ); YUI_CHECK_NEW( _dialogHeading ); - _dialogHeading->setFont( YQUI::yqApp()->headingFont() ); + headingHBox->addWidget( _dialogHeading ); _dialogHeading->setAlignment( Qt::AlignLeft | Qt::WordBreak ); _dialogHeading->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Minimum ) ); // hor/vert - -#if 0 - addHStretch( headingHBox ); -#endif - addVSpacing( workArea ); - -#if USE_SEPARATOR - - Q3HBox * hbox = new Q3HBox( workArea ); - - addHSpacing( hbox, SEPARATOR_MARGIN ); - - QFrame * separator = new QFrame( hbox ); - YUI_CHECK_NEW( separator ); - separator->setFrameStyle( QFrame::HLine | QFrame::Sunken ); - - addHSpacing( hbox, SEPARATOR_MARGIN ); - addVSpacing( workArea ); -#endif + _dialogHeading->setObjectName( "DialogHeading" ); // // Client area (the part that belongs to the YCP application) // - layoutClientArea( workArea ); - + layoutClientArea( parent ); + vbox->addWidget( _clientArea ); // // Button box // - layoutButtonBox( workAreaVBox ); - + QLayout *bb = layoutButtonBox( parent ); + vbox->addLayout( bb ); - // - // Spacer (purely decorative) at the right of the client area - // - - addGradientColumn( parentHBox, WORK_AREA_RIGHT_MARGIN ); + return vbox; } @@ -1089,12 +745,7 @@ { _clientArea = new Q3VBox( parent ); YUI_CHECK_NEW( _clientArea ); - _clientArea->setMargin( 4 ); - -#if 0 - _clientArea->setPaletteBackgroundColor( QColor( 0x60, 0x60, 0x60 ) ); -#endif - + _clientArea->layout()->setMargin( 4 ); // // HVCenter for wizard contents @@ -1108,7 +759,6 @@ _contents->installEventFilter( this ); _contents->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Expanding ) ); // hor/vert - // // Replace point for wizard contents // @@ -1121,293 +771,92 @@ YUI::widgetFactory()->createEmpty( _contentsReplacePoint ); _contentsReplacePoint->showChild(); + } -void YQWizard::layoutButtonBox( QWidget * parent ) +QLayout *YQWizard::layoutButtonBox( QWidget * parent ) { // - // Button box and layout - // - - QWidget * buttonBox = new QWidget( parent ); - YUI_CHECK_NEW( buttonBox ); - - // Using old-style layouts to enable a seamless background with the - // gradient pixmap: Any sub-widgets (Q3VBox, QHBox) would have to get yet - // another portion of that gradient as their backround pixmap, and it would - // be very hard to cover all cases - resizing, hiding individual buttons, etc. - - QVBoxLayout * vbox = new QVBoxLayout( buttonBox, 0, 0 ); // parent, margin, spacing - YUI_CHECK_NEW( vbox ); - - vbox->addSpacing( BUTTON_BOX_TOP_MARGIN ); - - - // // QHBoxLayout for the buttons // - QHBoxLayout * hbox = new QHBoxLayout( vbox, 2 ); // parent, spacing + QHBoxLayout * hbox = new QHBoxLayout(); // parent, spacing YUI_CHECK_NEW( hbox ); + hbox->setSpacing( 5 ); + hbox->setMargin( 5 ); - // - // "Back" button - // - - _backButton = new YQWizardButton( this, buttonBox, _backButtonLabel ); - YUI_CHECK_NEW( _backButton ); - hbox->addWidget( (QWidget *) _backButton->widgetRep() ); - connect( _backButton, SIGNAL( clicked() ), - this, SLOT ( slotBackClicked() ) ); - - _backButtonSpacer = new QSpacerItem( 0, 0, // width, height - QSizePolicy::Expanding, // horizontal - QSizePolicy::Minimum ); // vertical - YUI_CHECK_NEW( _backButtonSpacer ); - hbox->addItem( _backButtonSpacer ); + // Help button - intentionally without keyboard shortcut + _helpButton = new QPushButton( _( "Help" ), parent ); + YUI_CHECK_NEW( _helpButton ); + connect( _helpButton, SIGNAL( clicked() ), + this, SLOT ( showHelp() ) ); - if ( _backButton->text().isEmpty() ) - { - _backButton->hide(); +#if USE_ICON_ON_HELP_BUTTON + QPixmap pixmap = QPixmap( PIXMAP_DIR "help-button.png" ); - // Minimize _backButtonSpacer - _backButtonSpacer->changeSize( 0, 0, // width, height - QSizePolicy::Minimum, // horizontal - QSizePolicy::Minimum ); // vertical - } + if ( ! pixmap.isNull() ) + _helpButton->setPixmap( pixmap ); +#endif + hbox->addWidget( _helpButton ); + hbox->addStretch( 10 ); // // "Abort" button // - _abortButton = new YQWizardButton( this, buttonBox, _abortButtonLabel ); + _abortButton = new YQWizardButton( this, parent, _abortButtonLabel ); YUI_CHECK_NEW( _abortButton ); hbox->addWidget( (QWidget *) _abortButton->widgetRep() ); connect( _abortButton, SIGNAL( clicked() ), this, SLOT ( slotAbortClicked() ) ); + hbox->addSpacing( 10 ); + + // + // "Back" button + // + + _backButton = new YQWizardButton( this, parent, _backButtonLabel ); + YUI_CHECK_NEW( _backButton ); - // Using spacer rather than addSpacing() since the default stretchability - // of a QSpacerItem is undefined, i.e. centering the middle button could - // not be guaranteed. - - QSpacerItem * spacer = new QSpacerItem( 0, 0, // width, height - QSizePolicy::Expanding, // horizontal - QSizePolicy::Minimum ); // vertical - YUI_CHECK_NEW( spacer ); - hbox->addItem( spacer ); + hbox->addWidget( (QWidget *) _backButton->widgetRep() ); + connect( _backButton, SIGNAL( clicked() ), + this, SLOT ( slotBackClicked() ) ); + if ( _backButton->text().isEmpty() ) + _backButton->hide(); // // "Next" button // - _nextButton = new YQWizardButton( this, buttonBox, _nextButtonLabel ); + _nextButton = new YQWizardButton( this, parent, _nextButtonLabel ); YUI_CHECK_NEW( _nextButton ); hbox->addWidget( (QWidget *) _nextButton->widgetRep() ); connect( _nextButton, SIGNAL( clicked() ), this, SLOT ( slotNextClicked() ) ); - - // - // Bottom margin and gradient - // - - vbox->addSpacing( WORK_AREA_BOTTOM_MARGIN ); - -#if ENABLE_GRADIENTS - setBottomCroppedGradient( buttonBox, _bottomGradientPixmap, buttonBox->sizeHint().height() ); -#endif - - buttonBox->setSizePolicy( QSizePolicy( QSizePolicy::Preferred, QSizePolicy::Fixed ) ); // hor/vert -} - - - -void YQWizard::loadGradientPixmaps() -{ -#if ENABLE_GRADIENTS - if ( highColorDisplay() ) - { - _topGradientPixmap = QPixmap( PIXMAP_DIR "top-gradient.png" ); - _bottomGradientPixmap = QPixmap( PIXMAP_DIR "bottom-gradient.png" ); - _titleBarGradientPixmap = QPixmap( PIXMAP_DIR "title-bar-gradient.png" ); - _gradientCenterColor = pixelColor( _bottomGradientPixmap, 0, 0, paletteBackgroundColor() ); - _gradientTopColor = pixelColor( _topGradientPixmap, 0, 0 , paletteBackgroundColor() ); - } - else // 8 bit display or worse - don't use gradients - { - // Gradient pixmaps remain empty. The respecive widgets will retain the - // default widget background (grey, depending on the widget theme). - - // Use deault widget background (some shade of grey) for the center - // stretchable part of the side bar. - _gradientCenterColor = paletteBackgroundColor(); - _gradientTopColor = paletteBackgroundColor(); - } -#endif -} - - -void YQWizard::loadStepsIcons() -{ - _stepCurrentIcon = YQIconPool::stepCurrent(); - _stepToDoIcon = YQIconPool::stepToDo(); - _stepDoneIcon = YQIconPool::stepDone(); - - if ( highColorDisplay() ) - { - _stepCurrentColor = pixelColor( QPixmap( PIXMAP_DIR "color-step-current.png" ), 0, 0, paletteForegroundColor() ); - _stepToDoColor = pixelColor( QPixmap( PIXMAP_DIR "color-step-todo.png" ), 0, 0, paletteForegroundColor() ); - _stepDoneColor = pixelColor( QPixmap( PIXMAP_DIR "color-step-done.png" ), 0, 0, paletteForegroundColor() ); - } - else - { - _stepCurrentColor = paletteForegroundColor(); - _stepToDoColor = paletteForegroundColor(); - _stepDoneColor = paletteForegroundColor(); - } -} - - - -void YQWizard::setGradient( QWidget * widget, const QPixmap & pixmap ) -{ -#if ENABLE_GRADIENTS - if ( widget && ! pixmap.isNull() ) - { - widget->setFixedHeight( pixmap.height() ); - widget->setPaletteBackgroundPixmap( pixmap ); - } -#endif -} - - - -void YQWizard::setBottomCroppedGradient( QWidget * widget, const QPixmap & pixmap, int croppedHeight ) -{ -#if ENABLE_GRADIENTS - setGradient( widget, bottomCropPixmap( pixmap, croppedHeight ) ); -#endif -} - - - -QPixmap YQWizard::bottomCropPixmap( const QPixmap & full, int croppedHeight ) -{ - QPixmap pixmap; - -#if ENABLE_GRADIENTS - - if ( full.height() > croppedHeight ) - { - pixmap = QPixmap( full.width(), croppedHeight ); - - bitBlt( &pixmap, 0, 0, // dest, dest_x, dest_y - &full, 0, full.height() - croppedHeight - 1, // src, src_x, src_y - full.width(), croppedHeight ); // src_width, src_height - } - else - { - pixmap = full; - } -#endif - - return pixmap; -} - - - -QColor YQWizard::pixelColor( const QPixmap & pixmap, int x, int y, const QColor & defaultColor ) -{ - if ( pixmap.isNull() ) - return defaultColor; - - // QPixmap doesn't allow direct access to pixel values (which makes some - // sense since this requires a round-trip to the X server - pixmaps are X - // server resources), so we need to convert the QPixmap to a QImage to get - // that information. But since this conversion is expensive, we might save - // some performance if we only convert the part we really need - so let's - // cut out a tiny portion of the original pixmap and convert only that tiny - // portion. - - - QPixmap tiny( 1, 1 ); - - bitBlt( &tiny, 0, 0, // dest, dest_x, dest_y - &pixmap, x, y, // src, src_x, src_y - 1, 1 ); // src_width, src_height - - QImage image = tiny.convertToImage(); - - - return QColor( image.pixel( 0, 0 ) ); -} - - - -void YQWizard::addGradientColumn( QWidget * parent, int width ) -{ - if ( ! parent ) - return; - - Q3VBox * vbox = new Q3VBox( parent ); - YUI_CHECK_NEW( vbox ); - -#if ENABLE_GRADIENTS - QWidget * topGradient = addHSpacing( vbox, width ); - YUI_CHECK_NEW( topGradient ); - setGradient( topGradient, _topGradientPixmap ); - - QWidget * centerStretch = new QWidget( vbox ); - YUI_CHECK_NEW( centerStretch ); - centerStretch->setPaletteBackgroundColor( _gradientCenterColor ); - - - QWidget * bottomGradient = new QWidget( vbox ); - YUI_CHECK_NEW( bottomGradient ); - setGradient( bottomGradient, _bottomGradientPixmap ); -#else - vbox->setFixedWidth( width ); -#endif - + return hbox; } - void YQWizard::destroyButtons() { - if ( _backButton ) - { - delete _backButton; - _backButton = 0; - } - - if ( _abortButton ) - { - delete _abortButton; - _abortButton = 0; - } + delete _backButton; + _backButton = 0; - if ( _nextButton ) - { - delete _nextButton; - _nextButton = 0; - } -} + delete _abortButton; + _abortButton = 0; - - -bool YQWizard::highColorDisplay() const -{ - return depth() > 8; + delete _nextButton; + _nextButton = 0; } @@ -1488,17 +937,8 @@ void YQWizard::setHelpText( const string & helpText ) { - if ( _helpBrowser ) - { - if ( ! helpText.empty() ) - { - QString qHelpText = fromUTF8( helpText ); - qHelpText.replace( "&product;", YQUI::ui()->productName() ); - _helpBrowser->setText( qHelpText ); - } - else - _helpBrowser->clear(); - } + _qHelpText = fromUTF8( helpText ); + _qHelpText.replace( "&product;", YQUI::ui()->productName() ); } @@ -1535,10 +975,11 @@ void YQWizard::showHelp() { - if ( _sideBar && _helpPanel ) - { - _sideBar->raiseWidget( _helpPanel ); - } + QDialog helpDlg( this ); + Ui_QHelpDialog ui; + ui.setupUi( &helpDlg ); + ui.textBrowser->setText( _qHelpText ); + helpDlg.exec(); } @@ -1587,11 +1028,7 @@ connect( menu, SIGNAL( activated ( int ) ), this, SLOT ( sendMenuEvent( int ) ) ); - if ( _menuBarBox && _menuBarBox->isHidden() ) - { - _menuBarBox->show(); - _menuBarBox->setFixedHeight( _menuBar->sizeHint().height() + MENU_BAR_MARGIN ); - } + _menuBar->show(); } } @@ -1658,7 +1095,7 @@ { if ( _menuBar ) { - _menuBarBox->hide(); + _menuBar->hide(); _menuBar->clear(); _menuIDs.clear(); _menuEntryIDs.clear(); @@ -1707,7 +1144,7 @@ void YQWizard::resizeClientArea() { - // y2debug( "resizing client area" ); + y2debug( "resizing client area" ); QRect contentsRect = _clientArea->contentsRect(); _contents->setSize( contentsRect.width(), contentsRect.height() ); } @@ -1734,34 +1171,7 @@ YQWizardButton * wizardButton = dynamic_cast<YQWizardButton *> (button); if ( wizardButton ) - { - if ( newLabel.empty() ) - { - wizardButton->hide(); - - if ( wizardButton == _backButton && _backButtonSpacer ) - { - // Minimize _backButtonSpacer - - _backButtonSpacer->changeSize( 0, 0, // width, height - QSizePolicy::Minimum, // horizontal - QSizePolicy::Minimum ); // vertical - } - } - else - { - wizardButton->show(); - - if ( button == _backButton && _backButtonSpacer ) - { - // Restore _backButtonSpacer to normal size - - _backButtonSpacer->changeSize( 0, 0, // width, height - QSizePolicy::Expanding, // horizontal - QSizePolicy::Minimum ); // vertical - } - } - } + wizardButton->setVisible( !newLabel.empty() ); } @@ -1771,7 +1181,7 @@ { y2error( "NULL Release Notes button" ); - if ( ! _stepsBox ) + if ( ! _stepsPanel ) y2error( "This works only if there is a \"steps\" panel!" ); return; @@ -1781,9 +1191,7 @@ _releaseNotesButton->setText( fromUTF8( YShortcut::cleanShortcutString( label ) ) ); _releaseNotesButtonId = id; - if ( _releaseNotesButton->isHidden() ) - _releaseNotesButton->show(); - + _releaseNotesButton->show(); } @@ -1811,4 +1219,23 @@ _treeButton->setText( _( "Tree" ) ); } +void YQWizard::Step::setStatus( Status s ) +{ + if ( !_statusLabel || _status == s ) + return; + + _status = s; + + if ( s == Todo ) + _statusLabel->setProperty( "class", "todo-step QLabel" ); + + if ( s == Done ) + _statusLabel->setProperty( "class", "done-step QLabel" ); + + if ( s == Current ) + _statusLabel->setProperty( "class", "current-step QLabel" ); + + qApp->style()->polish( _statusLabel ); +} + #include "YQWizard.moc" Modified: branches/tmp/coolo/qt4-port/src/YQWizard.h URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/coolo/qt4-port/src/YQWizard.h?rev=42629&r1=42628&r2=42629&view=diff ============================================================================== --- branches/tmp/coolo/qt4-port/src/YQWizard.h (original) +++ branches/tmp/coolo/qt4-port/src/YQWizard.h Mon Dec 3 17:55:25 2007 @@ -391,35 +391,6 @@ **/ void showTree(); - /** - * Set a widget's background pixmap to a gradient pixmap and set the - * widget's height (fixed) to that pixmap's height. - **/ - static void setGradient( QWidget * widget, const QPixmap & pixmap ); - - /** - * Set a widget's background to the lower portion (the bottom - * 'croppedHeight' pixels) of a pixmap and set the widget's height (fixed) - * to that 'croppedHeight'. - **/ - static void setBottomCroppedGradient( QWidget * widget, - const QPixmap & pixmap, - int croppedHeight ); - - /** - * Bottom-crop a pixmap: Return a pixmap with the bottom 'croppedHeight' - * pixels. - **/ - static QPixmap bottomCropPixmap( const QPixmap & pixmap, int croppedHeight ); - - /** - * Return the color of pixel( x, y ) of a pixmap. - * If pixmap is null defaultColor is returned. - * This is a _very_ expensive operation! - **/ - static QColor pixelColor( const QPixmap & pixmap, int x, int y, const QColor & defaultColor ); - - protected slots: /** @@ -470,25 +441,14 @@ // Layout functions void layoutTitleBar ( QWidget * parent ); - void layoutSideBar ( QWidget * parent ); + QLayout *layoutSideBar ( QWidget * parent ); void layoutSideBarButtonBox ( QWidget * parent, QPushButton * button ); void layoutStepsPanel(); void layoutHelpPanel(); void layoutTreePanel(); - void layoutWorkArea ( QFrame * parentHBox ); + QLayout *layoutWorkArea ( QFrame * parentHBox ); void layoutClientArea( QWidget * parent ); - void layoutButtonBox( QWidget * parent ); - - - /** - * Load gradient pixmaps - **/ - void loadGradientPixmaps(); - - /** - * Load step status icons - **/ - void loadStepsIcons(); + QLayout *layoutButtonBox( QWidget * parent ); /** * Destroy the button box's buttons @@ -501,27 +461,11 @@ void updateStepStates(); /** - * Add a (left or right) margin of the specified width to a widget, - * consisting of a fixed height top gradient , a flexible center part (in - * the gradient center color) and a fixed height bottom gradient. - * - * The bottom gradient widget is returned as a reference for other - * background pixmaps. - **/ - void addGradientColumn( QWidget * parent, int width = 8 ); - - /** * Send a wizard event with the specified ID. **/ void sendEvent( const string & id ); /** - * Returns 'true' if the application is running on a high-color display, - * i.e., on an X visual with more than 8 bit depth. - **/ - bool highColorDisplay() const; - - /** * Notification that a signal is being connected. * * Reimplemented from QObject. @@ -551,11 +495,6 @@ void setButtonFocus( YQWizardButton * button ); /** - * Set text color and status icon for one wizard step - **/ - void setStepStatus( YQWizard::Step * step, const QPixmap & icon, const QColor & color ); - - /** * Find a step with the specified ID. Returns 0 if there is no such step. **/ YQWizard::Step * findStep( const QString & id ); @@ -583,45 +522,26 @@ bool _sendButtonEvents; Direction _direction; - QPixmap _titleBarGradientPixmap; - QPixmap _topGradientPixmap; - QColor _gradientCenterColor; - QColor _gradientTopColor; - QPixmap _bottomGradientPixmap; - - QPixmap _stepCurrentIcon; - QPixmap _stepToDoIcon; - QPixmap _stepDoneIcon; - - QColor _stepCurrentColor; - QColor _stepToDoColor; - QColor _stepDoneColor; - QString _currentStepID; + QString _qHelpText; Q3WidgetStack * _sideBar; - Q3VBox * _stepsPanel; - Q3VBox * _stepsBox; - QGridLayout * _stepsGrid; - QPushButton * _releaseNotesButton; - string _releaseNotesButtonId; - QPushButton * _helpButton; - Q3HBox * _helpPanel; - Q3TextBrowser * _helpBrowser; + QWidget * _stepsPanel; + QPushButton * _releaseNotesButton; + string _releaseNotesButtonId; + QPushButton * _helpButton; QPushButton * _stepsButton; QPushButton * _treeButton; Q3HBox * _treePanel; QY2ListView * _tree; - Q3VBox * _clientArea; - QWidget * _menuBarBox; + QWidget * _clientArea; QMenuBar * _menuBar; QLabel * _dialogIcon; QLabel * _dialogHeading; YQAlignment * _contents; YQWizardButton * _backButton; - QSpacerItem * _backButtonSpacer; YQWizardButton * _abortButton; YQWizardButton * _nextButton; YReplacePoint * _contentsReplacePoint; @@ -648,6 +568,7 @@ , _nameLabel(0) , _enabled( true ) , _idList( id ) + , _status( Unset ) {} /** @@ -657,6 +578,8 @@ virtual bool isHeading() const { return false; } + enum Status { Unset, Todo, Current, Done }; + QString name() const { return _name; } QLabel * statusLabel() const { return _statusLabel; } QLabel * nameLabel() const { return _nameLabel; } @@ -668,6 +591,11 @@ void setStatusLabel( QLabel * label ) { _statusLabel = label; } void setNameLabel ( QLabel * label ) { _nameLabel = label; } void setEnabled( bool enabled ) { _enabled = enabled; } + + /** + * Set text color and status icon for one wizard step + **/ + void setStatus( Status s ); protected: @@ -676,6 +604,7 @@ QLabel * _nameLabel; bool _enabled; QStringList _idList; + Status _status; }; Copied: branches/tmp/coolo/qt4-port/theme/style.qss (from r42493, branches/tmp/coolo/wizard-rework/theme/style.qss) URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/coolo/qt4-port/theme/style.qss?p2=branches/tmp/coolo/qt4-port/theme/style.qss&p1=branches/tmp/coolo/wizard-rework/theme/style.qss&r1=42493&r2=42629&rev=42629&view=diff ============================================================================== --- branches/tmp/coolo/wizard-rework/theme/style.qss (original) +++ branches/tmp/coolo/qt4-port/theme/style.qss Mon Dec 3 17:55:25 2007 @@ -1,24 +1,28 @@ +/* Hintergrund: background-$RESULTION */ + .YQWizard { - background-image: url(bottom-gradient.png); + pbackground-image: url(bottom-gradient.png); + background-image: url(background-1024x768.png); background-position: bottom; background-repeat: repeat-x; } +QDWidget { border-style: solid; border-width: 5px; } + +QWidget { color: white; } + /* We provide a min-width and min-height for push buttons so that they look elegant regardless of the width of the text. */ QPushButton { - background-color: palegoldenrod; - border-width: 2px; - border-color: darkkhaki; - border-style: solid; - border-radius: 5; padding: 3px; + margin-left: 20px; min-width: 9ex; min-height: 2.5ex; + color: black; } -QPushButton:hover { - background-color: khaki; +QTextBrowser { + color: black; } /* Increase the padding, so the text is shifted when the button is @@ -54,12 +58,12 @@ .steps_heading { font: bold; - font-size: 14px; + font-size: 14pt; } #DialogIcon {} #DialogHeading { font-size: 20px; - padding: 12px; + padding: 12pt; } -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org
participants (1)
-
coolo@svn.opensuse.org