Layout and whitespace update.
svn path=/trunk/kdebase/kwin/; revision=261305
This commit is contained in:
parent
26a5b0bfb4
commit
5bf63947d9
2 changed files with 32 additions and 36 deletions
|
@ -97,21 +97,23 @@ KWinDecorationModule::KWinDecorationModule(QWidget* parent, const char* name, co
|
||||||
// cbUseMiniWindows = new QCheckBox( i18n( "Render mini &titlebars for all windows"), checkGroup );
|
// cbUseMiniWindows = new QCheckBox( i18n( "Render mini &titlebars for all windows"), checkGroup );
|
||||||
// QWhatsThis::add( cbUseMiniWindows, i18n( "Note that this option is not available on all styles yet!" ) );
|
// QWhatsThis::add( cbUseMiniWindows, i18n( "Note that this option is not available on all styles yet!" ) );
|
||||||
|
|
||||||
QFrame* preview_frame = new QFrame( pluginPage );
|
QFrame* preview_frame = new QFrame( pluginPage );
|
||||||
preview_frame->setFrameShape( QFrame::NoFrame );
|
preview_frame->setFrameShape( QFrame::NoFrame );
|
||||||
QVBoxLayout* preview_layout = new QVBoxLayout( preview_frame, 0, KDialog::spacingHint());
|
QVBoxLayout* preview_layout = new QVBoxLayout( preview_frame, 0 );
|
||||||
preview = new KDecorationPreview( preview_frame );
|
preview = new KDecorationPreview( preview_frame );
|
||||||
preview_layout->addWidget( preview );
|
preview_layout->addWidget( preview );
|
||||||
pluginLayout->addWidget( preview_frame );
|
pluginLayout->addWidget( preview_frame );
|
||||||
pluginLayout->setStretchFactor( preview_frame, 10 );
|
pluginLayout->setStretchFactor( preview_frame, 10 );
|
||||||
|
|
||||||
pluginSettingsLbl = new QLabel( i18n("Decoration Options"), pluginPage );
|
pluginSettingsGrp = new QGroupBox( i18n("Decoration Options"), pluginPage );
|
||||||
pluginSettingsLine = new QFrame( pluginPage );
|
pluginSettingsGrp->setColumnLayout( 0, Vertical );
|
||||||
pluginSettingsLine ->setFrameStyle( QFrame::HLine | QFrame::Plain );
|
pluginSettingsGrp->setFlat( true );
|
||||||
pluginConfigWidget = new QVBox(pluginPage);
|
pluginSettingsGrp->layout()->setMargin( 0 );
|
||||||
pluginLayout->addWidget(pluginSettingsLbl );
|
pluginSettingsGrp->layout()->setSpacing( KDialog::spacingHint() );
|
||||||
pluginLayout->addWidget(pluginSettingsLine);
|
pluginLayout->addWidget( pluginSettingsGrp );
|
||||||
pluginLayout->addWidget(pluginConfigWidget);
|
|
||||||
|
pluginConfigWidget = new QVBox(pluginSettingsGrp);
|
||||||
|
pluginSettingsGrp->layout()->add( pluginConfigWidget );
|
||||||
|
|
||||||
// Page 2 (Button Selector)
|
// Page 2 (Button Selector)
|
||||||
QVBox* buttonPage = new QVBox( tabWidget );
|
QVBox* buttonPage = new QVBox( tabWidget );
|
||||||
|
@ -130,7 +132,7 @@ KWinDecorationModule::KWinDecorationModule(QWidget* parent, const char* name, co
|
||||||
lBorder->setBuddy( slBorder );
|
lBorder->setBuddy( slBorder );
|
||||||
lBorder->hide();
|
lBorder->hide();
|
||||||
slBorder->hide();
|
slBorder->hide();
|
||||||
|
|
||||||
cbUseCustomButtonPositions = new QCheckBox(
|
cbUseCustomButtonPositions = new QCheckBox(
|
||||||
i18n("Use custom titlebar button &positions"), buttonPage );
|
i18n("Use custom titlebar button &positions"), buttonPage );
|
||||||
QWhatsThis::add( cbUseCustomButtonPositions,
|
QWhatsThis::add( cbUseCustomButtonPositions,
|
||||||
|
@ -387,20 +389,15 @@ void KWinDecorationModule::resetPlugin( KConfig* conf, const QString& currentDec
|
||||||
connect( this, SIGNAL(pluginLoad(KConfig*)), pluginObject, SLOT(load(KConfig*)) );
|
connect( this, SIGNAL(pluginLoad(KConfig*)), pluginObject, SLOT(load(KConfig*)) );
|
||||||
connect( this, SIGNAL(pluginSave(KConfig*)), pluginObject, SLOT(save(KConfig*)) );
|
connect( this, SIGNAL(pluginSave(KConfig*)), pluginObject, SLOT(save(KConfig*)) );
|
||||||
connect( this, SIGNAL(pluginDefaults()), pluginObject, SLOT(defaults()) );
|
connect( this, SIGNAL(pluginDefaults()), pluginObject, SLOT(defaults()) );
|
||||||
pluginSettingsLbl->show();
|
pluginSettingsGrp->show();
|
||||||
pluginSettingsLine->show();
|
|
||||||
pluginConfigWidget->show();
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pluginSettingsLbl->hide();
|
pluginSettingsGrp->hide();
|
||||||
pluginSettingsLine->hide();
|
|
||||||
pluginConfigWidget->hide();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// Reads the kwin config settings, and sets all UI controls to those settings
|
// Reads the kwin config settings, and sets all UI controls to those settings
|
||||||
// Updating the config plugin if required
|
// Updating the config plugin if required
|
||||||
void KWinDecorationModule::readConfig( KConfig* conf )
|
void KWinDecorationModule::readConfig( KConfig* conf )
|
||||||
|
@ -552,7 +549,7 @@ void KWinDecorationModule::defaults()
|
||||||
buttonSource->hideButton('I');
|
buttonSource->hideButton('I');
|
||||||
buttonSource->hideButton('A');
|
buttonSource->hideButton('A');
|
||||||
buttonSource->hideButton('X');
|
buttonSource->hideButton('X');
|
||||||
|
|
||||||
border_size = BorderNormal;
|
border_size = BorderNormal;
|
||||||
checkSupportedBorderSizes();
|
checkSupportedBorderSizes();
|
||||||
|
|
||||||
|
|
|
@ -86,7 +86,7 @@ class KWinDecorationModule : public KCModule, virtual public KWinDecorationIface
|
||||||
// Allows us to turn "save" on
|
// Allows us to turn "save" on
|
||||||
void slotSelectionChanged();
|
void slotSelectionChanged();
|
||||||
void slotChangeDecoration( const QString & );
|
void slotChangeDecoration( const QString & );
|
||||||
void slotBorderChanged( int );
|
void slotBorderChanged( int );
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void readConfig( KConfig* conf );
|
void readConfig( KConfig* conf );
|
||||||
|
@ -96,12 +96,12 @@ class KWinDecorationModule : public KCModule, virtual public KWinDecorationIface
|
||||||
void updateSelection();
|
void updateSelection();
|
||||||
QString decorationLibName( const QString& name );
|
QString decorationLibName( const QString& name );
|
||||||
QString decorationName ( QString& libName );
|
QString decorationName ( QString& libName );
|
||||||
static QString styleToConfigLib( QString& styleLib );
|
static QString styleToConfigLib( QString& styleLib );
|
||||||
void resetPlugin( KConfig* conf, const QString& currentDecoName = QString::null );
|
void resetPlugin( KConfig* conf, const QString& currentDecoName = QString::null );
|
||||||
void resetKWin();
|
void resetKWin();
|
||||||
void checkSupportedBorderSizes();
|
void checkSupportedBorderSizes();
|
||||||
static int borderSizeToIndex( BorderSize size, QValueList< BorderSize > sizes );
|
static int borderSizeToIndex( BorderSize size, QValueList< BorderSize > sizes );
|
||||||
static BorderSize indexToBorderSize( int index, QValueList< BorderSize > sizes );
|
static BorderSize indexToBorderSize( int index, QValueList< BorderSize > sizes );
|
||||||
|
|
||||||
QTabWidget* tabWidget;
|
QTabWidget* tabWidget;
|
||||||
|
|
||||||
|
@ -109,20 +109,19 @@ class KWinDecorationModule : public KCModule, virtual public KWinDecorationIface
|
||||||
KComboBox* decorationList;
|
KComboBox* decorationList;
|
||||||
QValueList<DecorationInfo> decorations;
|
QValueList<DecorationInfo> decorations;
|
||||||
|
|
||||||
KDecorationPreview* preview;
|
KDecorationPreview* preview;
|
||||||
KDecorationPlugins* plugins;
|
KDecorationPlugins* plugins;
|
||||||
KConfig kwinConfig;
|
KConfig kwinConfig;
|
||||||
|
|
||||||
QCheckBox* cbUseCustomButtonPositions;
|
QCheckBox* cbUseCustomButtonPositions;
|
||||||
// QCheckBox* cbUseMiniWindows;
|
// QCheckBox* cbUseMiniWindows;
|
||||||
QCheckBox* cbShowToolTips;
|
QCheckBox* cbShowToolTips;
|
||||||
QLabel* lBorder;
|
QLabel* lBorder;
|
||||||
QSlider* slBorder;
|
QSlider* slBorder;
|
||||||
BorderSize border_size;
|
BorderSize border_size;
|
||||||
|
|
||||||
QObject* pluginObject;
|
QObject* pluginObject;
|
||||||
QLabel* pluginSettingsLbl;
|
QGroupBox* pluginSettingsGrp;
|
||||||
QFrame* pluginSettingsLine;
|
|
||||||
QWidget* pluginConfigWidget;
|
QWidget* pluginConfigWidget;
|
||||||
QString currentLibraryName;
|
QString currentLibraryName;
|
||||||
QString oldLibraryName;
|
QString oldLibraryName;
|
||||||
|
|
Loading…
Reference in a new issue