diff --git a/clients/ozone/config/config.cpp b/clients/ozone/config/config.cpp index b65818fb08..667845d78d 100644 --- a/clients/ozone/config/config.cpp +++ b/clients/ozone/config/config.cpp @@ -49,7 +49,8 @@ OxygenConfig::OxygenConfig( KConfig*, QWidget* parent ) c = new KConfig( "oxygenrc" ); KConfigGroup cg(c, "Windeco"); ui = new OxygenConfigUI( parent ); - connect( ui->showStripes, SIGNAL(clicked()), SIGNAL(changed()) ); + connect( ui->showStripes, SIGNAL(clicked()), SIGNAL(changed()) ); + connect( ui->thinBorders, SIGNAL(clicked()), SIGNAL(changed()) ); connect( ui->blendTitlebarColors, SIGNAL(clicked()), SIGNAL(changed()) ); connect( ui->titleAlignmentLeft, SIGNAL(clicked()), SIGNAL(changed()) ); connect( ui->titleAlignmentCenter, SIGNAL(clicked()), SIGNAL(changed()) ); @@ -73,6 +74,7 @@ void OxygenConfig::load( const KConfigGroup& ) { KConfigGroup cg(c, "Windeco"); ui->showStripes->setChecked( cg.readEntry("ShowStripes", true) ); + ui->thinBorders->setChecked( cg.readEntry("ThinBorders", true) ); ui->blendTitlebarColors->setChecked( cg.readEntry("BlendTitlebarColors", true) ); QString titleAlignment = cg.readEntry("TitleAlignment", "Left"); @@ -87,6 +89,7 @@ void OxygenConfig::save( KConfigGroup& ) { KConfigGroup cg(c, "Windeco"); cg.writeEntry( "ShowStripes", ui->showStripes->isChecked() ); + cg.writeEntry( "ThinBorders", ui->thinBorders->isChecked() ); cg.writeEntry( "BlendTitlebarColors", ui->blendTitlebarColors->isChecked() ); QString titleAlignment = "Left"; @@ -107,6 +110,7 @@ void OxygenConfig::save( KConfigGroup& ) void OxygenConfig::defaults() { ui->showStripes->setChecked( true ); + ui->thinBorders->setChecked( true ); ui->titleAlignmentLeft->setChecked( true ); ui->blendTitlebarColors->setChecked( true ); diff --git a/clients/ozone/config/oxygenconfig.ui b/clients/ozone/config/oxygenconfig.ui index a8cb9043a5..0366c62d10 100644 --- a/clients/ozone/config/oxygenconfig.ui +++ b/clients/ozone/config/oxygenconfig.ui @@ -1,7 +1,8 @@ - + + Ozone::OxygenConfigUI - - + + 0 0 @@ -9,39 +10,39 @@ 234 - + Ozone - - + + 0 - - + + Title &Alignment - + - - + + true - + &Left - - + + Center - - + + &Right @@ -50,25 +51,32 @@ - - + + When enabled, this option makes the window title bar use the same colors as the window contents, instead of using the system title bar colors. - + Blend title bar colors with window contents - - + + When enabled, this option increases the visibility of the window titlebar by showing stripes - + Show stripes next to the title + + + + Use thin borders + + + diff --git a/clients/ozone/oxygen.cpp b/clients/ozone/oxygen.cpp index 63610bb415..ecb7170979 100644 --- a/clients/ozone/oxygen.cpp +++ b/clients/ozone/oxygen.cpp @@ -54,6 +54,7 @@ bool OxygenFactory::initialized_ = false; Qt::Alignment OxygenFactory::titleAlignment_ = Qt::AlignLeft; bool OxygenFactory::showStripes_ = true; bool OxygenFactory::blendTitlebarColors_ = true; +bool OxygenFactory::thinBorders_ = true; ////////////////////////////////////////////////////////////////////////////// // OxygenFactory() @@ -126,13 +127,17 @@ bool OxygenFactory::readConfig() else if (value == "Right") titleAlignment_ = Qt::AlignRight; - bool oldstripes = showStripes; + bool oldborders = thinBorders_; + thinBorders_ = group.readEntry( "ThinBorders", true ); + + bool oldstripes = showStripes_; showStripes_ = group.readEntry( "ShowStripes", true ); bool oldblend = blendTitlebarColors; blendTitlebarColors_ = group.readEntry( "BlendTitlebarColors", true ); - if (oldalign == titleAlignment_ && oldstripes == showStripes_ && oldblend == blendTitlebarColors_) + if (oldalign == titleAlignment_ && oldstripes == showStripes_ + && oldborders == thinBorders_) return false; else return true; diff --git a/clients/ozone/oxygen.h b/clients/ozone/oxygen.h index 2c6457c9c9..1ff307999e 100644 --- a/clients/ozone/oxygen.h +++ b/clients/ozone/oxygen.h @@ -72,6 +72,7 @@ public: static bool initialized(); static Qt::Alignment titleAlignment(); static bool showStripes(); + static bool thinBorders(); static bool blendTitlebarColors(); private: @@ -81,6 +82,7 @@ private: static bool initialized_; static Qt::Alignment titleAlignment_; static bool showStripes_; + static bool thinBorders_; static bool blendTitlebarColors_; }; @@ -96,6 +98,9 @@ inline bool OxygenFactory::blendTitlebarColors() inline bool OxygenFactory::showStripes() { return showStripes_; } +inline bool OxygenFactory::thinBorders() + { return thinBorders_; } + } //namespace Oxygen } //namespace Ozone diff --git a/clients/ozone/oxygenclient.cpp b/clients/ozone/oxygenclient.cpp index 759447e036..3c1b0d9da2 100644 --- a/clients/ozone/oxygenclient.cpp +++ b/clients/ozone/oxygenclient.cpp @@ -133,10 +133,16 @@ int OxygenClient::layoutMetric(LayoutMetric lm, bool respectWindowState, const K if (respectWindowState && maximized) { return 0; } else { - if (lm == LM_BorderBottom) - return BFRAMESIZE + 2; - else - return 2; + if (OxygenFactory::thinBorders()) + { + if (lm == LM_BorderBottom) { + return BFRAMESIZE + 2; + } else { + return 2; + } + } else { + return BFRAMESIZE; + } } }