Commit 0d291b3f authored by Emirald Mateli's avatar Emirald Mateli Committed by Nathaniel Graham

Added setting to toggle drawing of title bar separator

Summary:
Adds a new settings on Breeze theme which allows the user to turn off the title bar separator drawn

{F5437291}

{F5437290}

Rationale behind this patch:

From what I understand, the separator is seen as a design choice so I won't argue over it, not to mention something like this is entirely subjective.

However, I personally dislike the separator, especially on darker windows.  The only way to get rid of it is to either make a custom color scheme for each application so the colors match exactly or run a patched version of breeze (which is what I do). Before using my Breeze patched version I searched on the net on how to remove it, which led me to several threads with other users wanting to toggle it off which is why I make this patch public.

Below are screenshots where the separator is especially noticeable and in my non-design-expert opinion kind of distracting. I think it's a positive addition. Looking forward to your opinions on the matter.

{F5437332}

{F5437331}

{F5437330}

{F5437329}

Test Plan:
1. Use default breeze theme
2. Check the enable/disable the new setting

Reviewers: #breeze, #vdg, ngraham, hpereiradacosta

Reviewed By: ngraham

Subscribers: andreaska, abetts, jensreuterberg, broulik, rpelorosso, #breeze, ngraham, plasma-devel

Tags: #plasma

Differential Revision: https://phabricator.kde.org/D8362
parent 10061e1c
......@@ -122,7 +122,7 @@ namespace Breeze
{
auto c( client().data() );
if( !m_useSeparator ) return QColor();
if(! ( m_internalSettings->drawTitleBarSeparator() && m_useSeparator ) ) return QColor();
if( m_animation->state() == QPropertyAnimation::Running )
{
QColor color( c->palette().color( QPalette::Highlight ) );
......
......@@ -80,6 +80,10 @@
<default>false</default>
</entry>
<entry name="DrawTitleBarSeparator" type = "Bool">
<default>true</default>
</entry>
<!-- size grip -->
<entry name="DrawBackgroundGradient" type = "Bool">
<default>true</default>
......
......@@ -52,6 +52,7 @@ namespace Breeze
connect( m_ui.drawBorderOnMaximizedWindows, SIGNAL(clicked()), SLOT(updateChanged()) );
connect( m_ui.drawSizeGrip, SIGNAL(clicked()), SLOT(updateChanged()) );
connect( m_ui.drawBackgroundGradient, SIGNAL(clicked()), SLOT(updateChanged()) );
connect( m_ui.drawTitleBarSeparator, SIGNAL(clicked()), SLOT(updateChanged()) );
// track animations changes
connect( m_ui.animationsEnabled, SIGNAL(clicked()), SLOT(updateChanged()) );
......@@ -84,6 +85,7 @@ namespace Breeze
m_ui.drawBackgroundGradient->setChecked( m_internalSettings->drawBackgroundGradient() );
m_ui.animationsEnabled->setChecked( m_internalSettings->animationsEnabled() );
m_ui.animationsDuration->setValue( m_internalSettings->animationsDuration() );
m_ui.drawTitleBarSeparator->setChecked( m_internalSettings->drawTitleBarSeparator() );
// load shadows
m_ui.shadowSize->setValue( m_internalSettings->shadowSize() );
......@@ -115,6 +117,7 @@ namespace Breeze
m_internalSettings->setDrawBackgroundGradient( m_ui.drawBackgroundGradient->isChecked() );
m_internalSettings->setAnimationsEnabled( m_ui.animationsEnabled->isChecked() );
m_internalSettings->setAnimationsDuration( m_ui.animationsDuration->value() );
m_internalSettings->setDrawTitleBarSeparator(m_ui.drawTitleBarSeparator->isChecked());
m_internalSettings->setShadowSize( m_ui.shadowSize->value() );
m_internalSettings->setShadowStrength( qRound( qreal(m_ui.shadowStrength->value()*255)/100 ) );
......@@ -161,6 +164,7 @@ namespace Breeze
m_ui.drawBackgroundGradient->setChecked( m_internalSettings->drawBackgroundGradient() );
m_ui.animationsEnabled->setChecked( m_internalSettings->animationsEnabled() );
m_ui.animationsDuration->setValue( m_internalSettings->animationsDuration() );
m_ui.drawTitleBarSeparator->setChecked( m_internalSettings->drawTitleBarSeparator() );
m_ui.shadowSize->setValue( m_internalSettings->shadowSize() );
m_ui.shadowStrength->setValue( qRound(qreal(m_internalSettings->shadowStrength()*100)/255 ) );
......@@ -178,6 +182,7 @@ namespace Breeze
// track modifications
bool modified( false );
if (m_ui.drawTitleBarSeparator->isChecked() != m_internalSettings->drawTitleBarSeparator()) modified = true;
if( m_ui.titleAlignment->currentIndex() != m_internalSettings->titleAlignment() ) modified = true;
else if( m_ui.buttonSize->currentIndex() != m_internalSettings->buttonSize() ) modified = true;
else if( m_ui.outlineCloseButton->isChecked() != m_internalSettings->outlineCloseButton() ) modified = true;
......
......@@ -125,7 +125,7 @@
</property>
</spacer>
</item>
<item row="6" column="0" colspan="3">
<item row="7" column="0" colspan="3">
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
......@@ -145,6 +145,13 @@
</property>
</widget>
</item>
<item row="6" column="0" colspan="3">
<widget class="QCheckBox" name="drawTitleBarSeparator">
<property name="text">
<string>Draw separator between Title Bar and Window when colors differ</string>
</property>
</widget>
</item>
<item row="3" column="0" colspan="3">
<widget class="QCheckBox" name="drawBorderOnMaximizedWindows">
<property name="text">
......@@ -377,6 +384,7 @@
<tabstop>drawBorderOnMaximizedWindows</tabstop>
<tabstop>drawBackgroundGradient</tabstop>
<tabstop>drawSizeGrip</tabstop>
<tabstop>drawTitleBarSeparator</tabstop>
<tabstop>animationsEnabled</tabstop>
<tabstop>animationsDuration</tabstop>
<tabstop>shadowSize</tabstop>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment