Skip to content

Commit

Permalink
Unison hovering option + some cleaning
Browse files Browse the repository at this point in the history
  • Loading branch information
kupiqu committed Dec 1, 2019
1 parent 7e4ed92 commit 0de88f3
Show file tree
Hide file tree
Showing 7 changed files with 174 additions and 188 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

project(sierrabreezeenhanced)
set(PROJECT_VERSION "0.7.4")
set(PROJECT_VERSION "0.7.5")
set(PROJECT_VERSION_MAJOR 0)

cmake_minimum_required(VERSION 2.8.12 FATAL_ERROR)
Expand Down
5 changes: 5 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
V0.7.5
---------

* Unison Hovering option

V0.7.4
---------

Expand Down
205 changes: 87 additions & 118 deletions breezebutton.cpp

Large diffs are not rendered by default.

7 changes: 6 additions & 1 deletion breezebutton.h
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,12 @@ namespace Breeze
QColor foregroundColor() const;
QColor backgroundColor() const;
QColor mixColors(const QColor&, const QColor&, qreal) const;
QColor autoColor( const bool, const bool, const bool, const bool, const QColor, const QColor ) const;
QColor autoColor( const bool, const bool, const bool, const QColor, const QColor ) const;
//@}

//*@hover buttons
//@{
bool hovered() const;
//@}

Flag m_flag = FlagNone;
Expand Down
109 changes: 55 additions & 54 deletions breezesettingsdata.kcfg
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,6 @@
<default>0, 0, 0</default>
</entry>

<!-- close button -->
<entry name="OutlineCloseButton" type = "Bool">
<default>true</default>
</entry>

</group>

<group name="Windeco">
Expand Down Expand Up @@ -105,28 +100,6 @@
<default>ButtonDefault</default>
</entry>

<entry name="ButtonSpacing" type = "Int">
<default>2</default>
</entry>

<entry name="ButtonPadding" type = "Int">
<default>4</default>
</entry>

<!-- corner radius -->
<entry name="CornerRadius" type = "Int">
<default>0</default>
</entry>

<!-- maximized windows -->
<entry name="DrawBorderOnMaximizedWindows" type = "Bool">
<default>false</default>
</entry>

<entry name="DrawTitleBarSeparator" type = "Bool">
<default>true</default>
</entry>

<!-- button style -->
<entry name="ButtonStyle" type="Enum">
<choices>
Expand All @@ -148,6 +121,45 @@
<default>macDarkAurorae</default>
</entry>

<entry name="ButtonSpacing" type = "Int">
<default>2</default>
</entry>

<entry name="ButtonPadding" type = "Int">
<default>4</default>
</entry>

<!-- hide title bar -->
<entry name="HideTitleBar" type = "Enum">
<choices>
<choice name="Never" />
<choice name="MaximizedWindows" />
<choice name="AnyMaximization" />
<choice name="Always" />
</choices>
<default>Never</default>
</entry>

<!-- match colors -->
<entry name="MatchColorForTitleBar" type = "Bool">
<default>false</default>
</entry>

<!-- unison hovering -->
<entry name="UnisonHovering" type = "Bool">
<default>true</default>
</entry>

<!-- maximized windows -->
<entry name="DrawBorderOnMaximizedWindows" type = "Bool">
<default>false</default>
</entry>

<!-- corner radius -->
<entry name="CornerRadius" type = "Int">
<default>0</default>
</entry>

<!-- size grip -->
<entry name="DrawBackgroundGradient" type = "Bool">
<default>true</default>
Expand All @@ -161,49 +173,38 @@
<default>-1</default>
</entry>

<entry name="TitleBarFont" type = "String"/>

<!-- size grip -->
<entry name="DrawSizeGrip" type = "Bool">
<default>false</default>
</entry>

<!-- match colors -->
<entry name="MatchColorForTitleBar" type = "Bool">
<default>false</default>
</entry>

<!-- animations -->
<entry name="AnimationsEnabled" type = "Bool">
<default>true</default>
</entry>

<entry name="AnimationsDuration" type = "Int">
<default>150</default>
</entry>

<!-- hide title bar -->
<entry name="HideTitleBar" type = "Enum">
<choices>
<choice name="Never" />
<choice name="MaximizedWindows" />
<choice name="AnyMaximization" />
<choice name="Always" />
</choices>
<default>Never</default>
<!-- titlebar separator -->
<entry name="DrawTitleBarSeparator" type = "Bool">
<default>true</default>
</entry>

<!-- opaque title bar -->
<entry name="OpaqueTitleBar" type = "Bool">
<default>true</default>
<default>true</default>
</entry>

<entry name="BackgroundOpacity" type = "Int">
<default>100</default>
</entry>

<entry name="OpacityOverride" type = "Int">
<default>-1</default>
<default>-1</default>
</entry>

<entry name="TitleBarFont" type = "String"/>

<!-- animations -->
<entry name="AnimationsEnabled" type = "Bool">
<default>true</default>
</entry>

<entry name="AnimationsDuration" type = "Int">
<default>150</default>
</entry>

<!-- dialogs -->
Expand Down
9 changes: 5 additions & 4 deletions config/breezeconfigwidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ namespace Breeze
connect( m_ui.buttonSize, SIGNAL(currentIndexChanged(int)), SLOT(updateChanged()) );
connect( m_ui.btnSpacingSpinBox, QOverload<int>::of(&QSpinBox::valueChanged), [=](int /*i*/){updateChanged();} );
connect( m_ui.buttonPadding, SIGNAL(valueChanged(int)), SLOT(updateChanged()) );
connect( m_ui.outlineCloseButton, SIGNAL(clicked()), SLOT(updateChanged()) );
connect( m_ui.unisonHovering, SIGNAL(clicked()), SLOT(updateChanged()) );
connect( m_ui.cornerRadiusSpinBox, QOverload<int>::of(&QSpinBox::valueChanged), [=](int /*i*/){updateChanged();} );
connect( m_ui.drawBorderOnMaximizedWindows, SIGNAL(clicked()), SLOT(updateChanged()) );
connect( m_ui.drawSizeGrip, SIGNAL(clicked()), SLOT(updateChanged()) );
Expand Down Expand Up @@ -99,7 +99,7 @@ namespace Breeze
m_ui.buttonSize->setCurrentIndex( m_internalSettings->buttonSize() );
m_ui.btnSpacingSpinBox->setValue( m_internalSettings->buttonSpacing() );
m_ui.buttonPadding->setValue( m_internalSettings->buttonPadding() );
m_ui.outlineCloseButton->setChecked( m_internalSettings->outlineCloseButton() );
m_ui.unisonHovering->setChecked( m_internalSettings->unisonHovering() );
m_ui.cornerRadiusSpinBox->setValue( m_internalSettings->cornerRadius() );
m_ui.drawBorderOnMaximizedWindows->setChecked( m_internalSettings->drawBorderOnMaximizedWindows() );
m_ui.drawSizeGrip->setChecked( m_internalSettings->drawSizeGrip() );
Expand Down Expand Up @@ -175,7 +175,7 @@ namespace Breeze
m_internalSettings->setButtonSize( m_ui.buttonSize->currentIndex() );
m_internalSettings->setButtonSpacing( m_ui.btnSpacingSpinBox->value() );
m_internalSettings->setButtonPadding( m_ui.buttonPadding->value() );
m_internalSettings->setOutlineCloseButton( m_ui.outlineCloseButton->isChecked() );
m_internalSettings->setUnisonHovering( m_ui.unisonHovering->isChecked() );
m_internalSettings->setCornerRadius( m_ui.cornerRadiusSpinBox->value() );
m_internalSettings->setDrawBorderOnMaximizedWindows( m_ui.drawBorderOnMaximizedWindows->isChecked() );
m_internalSettings->setDrawSizeGrip( m_ui.drawSizeGrip->isChecked() );
Expand Down Expand Up @@ -262,6 +262,7 @@ namespace Breeze
m_ui.buttonSize->setCurrentIndex( m_internalSettings->buttonSize() );
m_ui.btnSpacingSpinBox->setValue( m_internalSettings->buttonSpacing() );
m_ui.buttonPadding->setValue( m_internalSettings->buttonPadding() );
m_ui.unisonHovering->setChecked( m_internalSettings->unisonHovering() );
m_ui.cornerRadiusSpinBox->setValue( m_internalSettings->cornerRadius() );
m_ui.drawBorderOnMaximizedWindows->setChecked( m_internalSettings->drawBorderOnMaximizedWindows() );
m_ui.drawSizeGrip->setChecked( m_internalSettings->drawSizeGrip() );
Expand Down Expand Up @@ -328,7 +329,7 @@ namespace Breeze
else if( m_ui.buttonSize->currentIndex() != m_internalSettings->buttonSize() ) modified = true;
else if( m_ui.btnSpacingSpinBox->value() != m_internalSettings->buttonSpacing() ) modified = true;
else if ( m_ui.buttonPadding->value() != m_internalSettings->buttonPadding() ) modified = true;
else if( m_ui.outlineCloseButton->isChecked() != m_internalSettings->outlineCloseButton() ) modified = true;
else if( m_ui.unisonHovering->isChecked() != m_internalSettings->unisonHovering() ) modified = true;
else if( m_ui.cornerRadiusSpinBox->value() != m_internalSettings->cornerRadius() ) modified = true;
else if( m_ui.drawBorderOnMaximizedWindows->isChecked() != m_internalSettings->drawBorderOnMaximizedWindows() ) modified = true;
else if( m_ui.drawSizeGrip->isChecked() != m_internalSettings->drawSizeGrip() ) modified = true;
Expand Down
25 changes: 15 additions & 10 deletions config/ui/breezeconfigurationui.ui
Original file line number Diff line number Diff line change
Expand Up @@ -332,16 +332,16 @@
</widget>
</item>
<item row="6" column="1" colspan="10">
<widget class="QCheckBox" name="matchColorForTitleBar">
<property name="text">
<string>Match Title Bar to Window color</string>
</property>
</widget>
<widget class="QCheckBox" name="unisonHovering">
<property name="text">
<string>Unison hovering</string>
</property>
</widget>
</item>
<item row="7" column="1" colspan="10">
<widget class="QCheckBox" name="outlineCloseButton">
<widget class="QCheckBox" name="matchColorForTitleBar">
<property name="text">
<string>Draw a circle around close button (Plasma style only)</string>
<string>Match Title Bar to Window color</string>
</property>
</widget>
</item>
Expand Down Expand Up @@ -502,6 +502,9 @@
<property name="text">
<string>Corner radius:</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
</item>
<item row="9" column="8">
Expand Down Expand Up @@ -859,13 +862,15 @@
</customwidgets>
<tabstops>
<tabstop>titleAlignment</tabstop>
<tabstop>hideTitleBar</tabstop>
<tabstop>buttonSize</tabstop>
<tabstop>buttonStyle</tabstop>
<tabstop>btnSpacingSpinBox</tabstop>
<tabstop>outlineCloseButton</tabstop>
<tabstop>cornerRadiusSpinBox</tabstop>
<tabstop>buttonPadding</tabstop>
<tabstop>hideTitleBar</tabstop>
<tabstop>matchColorForTitleBar</tabstop>
<tabstop>unisonHovering</tabstop>
<tabstop>drawBorderOnMaximizedWindows</tabstop>
<tabstop>cornerRadiusSpinBox</tabstop>
<tabstop>drawBackgroundGradient</tabstop>
<tabstop>drawSizeGrip</tabstop>
<tabstop>drawTitleBarSeparator</tabstop>
Expand Down

0 comments on commit 0de88f3

Please sign in to comment.