Skip to content

Commit

Permalink
hide titlebar: never / maximized windows / always
Browse files Browse the repository at this point in the history
  • Loading branch information
kupiqu committed Nov 25, 2019
1 parent 88ccce1 commit c80471a
Show file tree
Hide file tree
Showing 8 changed files with 88 additions and 27 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.6.2")
set(PROJECT_VERSION "0.6.3")
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.6.3
---------

* Three options for hiding window title bars (never, always and only for maximized windows)

V0.6.2
---------

Expand Down
2 changes: 1 addition & 1 deletion breezedecoration.h
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ namespace Breeze
{ return (client().data()->isMaximizedVertically() || client().data()->adjacentScreenEdges().testFlag( Qt::BottomEdge ) ) && !m_internalSettings->drawBorderOnMaximizedWindows(); }

bool Decoration::hideTitleBar() const
{ return m_internalSettings->hideTitleBar() && !client().data()->isShaded(); }
{ return m_internalSettings->hideTitleBar() == 2 || ( m_internalSettings->hideTitleBar() == 1 && client().data()->isMaximized() ); }

bool Decoration::opaqueTitleBar() const
{ return m_internalSettings->opaqueTitleBar(); }
Expand Down
9 changes: 7 additions & 2 deletions breezesettingsdata.kcfg
Original file line number Diff line number Diff line change
Expand Up @@ -177,8 +177,13 @@
</entry>

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

<!-- opaque title bar -->
Expand Down
10 changes: 5 additions & 5 deletions config/breezeconfigwidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ namespace Breeze
connect( m_ui.opacitySpinBox, QOverload<int>::of(&QSpinBox::valueChanged), [=](int /*i*/){updateChanged();} );
connect( m_ui.gradientSpinBox, QOverload<int>::of(&QSpinBox::valueChanged), [=](int /*i*/){updateChanged();} );
connect( m_ui.drawTitleBarSeparator, SIGNAL(clicked()), SLOT(updateChanged()) );
connect( m_ui.hideTitleBar, SIGNAL(clicked()), SLOT(updateChanged()) );
connect( m_ui.hideTitleBar, SIGNAL(currentIndexChanged(int)), SLOT(updateChanged()) );
connect( m_ui.matchColorForTitleBar, SIGNAL(clicked()), SLOT(updateChanged()) );

connect( m_ui.fontComboBox, &QFontComboBox::currentFontChanged, [this] { updateChanged(); } );
Expand Down Expand Up @@ -111,7 +111,7 @@ namespace Breeze
m_ui.opacitySpinBox->setValue( m_internalSettings->backgroundOpacity() );
m_ui.gradientSpinBox->setValue( m_internalSettings->backgroundGradientIntensity() );
m_ui.drawTitleBarSeparator->setChecked( m_internalSettings->drawTitleBarSeparator() );
m_ui.hideTitleBar->setChecked( m_internalSettings->hideTitleBar() );
m_ui.hideTitleBar->setCurrentIndex( m_internalSettings->hideTitleBar() );
m_ui.matchColorForTitleBar->setChecked( m_internalSettings->matchColorForTitleBar() );

QString fontStr = m_internalSettings->titleBarFont();
Expand Down Expand Up @@ -187,7 +187,7 @@ namespace Breeze
m_internalSettings->setBackgroundOpacity(m_ui.opacitySpinBox->value());
m_internalSettings->setBackgroundGradientIntensity(m_ui.gradientSpinBox->value());
m_internalSettings->setDrawTitleBarSeparator(m_ui.drawTitleBarSeparator->isChecked());
m_internalSettings->setHideTitleBar( m_ui.hideTitleBar->isChecked() );
m_internalSettings->setHideTitleBar( m_ui.hideTitleBar->currentIndex() );
m_internalSettings->setMatchColorForTitleBar( m_ui.matchColorForTitleBar->isChecked() );

QFont f = m_ui.fontComboBox->currentFont();
Expand Down Expand Up @@ -268,7 +268,7 @@ namespace Breeze
m_ui.opaqueTitleBar->setChecked( m_internalSettings->opaqueTitleBar() );
m_ui.drawBackgroundGradient->setChecked( m_internalSettings->drawBackgroundGradient() );
m_ui.drawTitleBarSeparator->setChecked( m_internalSettings->drawTitleBarSeparator() );
m_ui.hideTitleBar->setChecked( m_internalSettings->hideTitleBar() );
m_ui.hideTitleBar->setCurrentIndex( m_internalSettings->hideTitleBar() );
m_ui.matchColorForTitleBar->setChecked( m_internalSettings->matchColorForTitleBar() );

m_ui.animationsEnabled->setChecked( m_internalSettings->animationsEnabled() );
Expand Down Expand Up @@ -338,7 +338,7 @@ namespace Breeze
else if( m_ui.opacitySpinBox->value() != m_internalSettings->backgroundOpacity() ) modified = true;
else if( m_ui.gradientSpinBox->value() != m_internalSettings->backgroundGradientIntensity() ) modified = true;
else if (m_ui.drawTitleBarSeparator->isChecked() != m_internalSettings->drawTitleBarSeparator()) modified = true;
else if ( m_ui.hideTitleBar->isChecked() != m_internalSettings->hideTitleBar() ) modified = true;
else if ( m_ui.hideTitleBar->currentIndex() != m_internalSettings->hideTitleBar() ) modified = true;
else if ( m_ui.matchColorForTitleBar->isChecked() != m_internalSettings->matchColorForTitleBar() ) modified = true;

// font (also see below)
Expand Down
8 changes: 4 additions & 4 deletions config/breezeexceptiondialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ namespace Breeze
for( CheckBoxMap::iterator iter = m_checkboxes.begin(); iter != m_checkboxes.end(); ++iter )
{ connect( iter.value(), SIGNAL(clicked()), SLOT(updateChanged()) ); }

connect( m_ui.hideTitleBar, SIGNAL(clicked()), SLOT(updateChanged()) );
connect( m_ui.hideTitleBar, SIGNAL(currentIndexChanged(int)), SLOT(updateChanged()) );
connect( m_ui.matchColorForTitleBar, SIGNAL(clicked()), SLOT(updateChanged()) );
connect( m_ui.drawBackgroundGradient, SIGNAL(clicked()), SLOT(updateChanged()) );
m_ui.gradientOverrideLabelSpinBox->setSpecialValueText(tr("None"));
Expand Down Expand Up @@ -86,7 +86,7 @@ namespace Breeze
m_ui.exceptionType->setCurrentIndex(m_exception->exceptionType() );
m_ui.exceptionEditor->setText( m_exception->exceptionPattern() );
m_ui.borderSizeComboBox->setCurrentIndex( m_exception->borderSize() );
m_ui.hideTitleBar->setChecked( m_exception->hideTitleBar() );
m_ui.hideTitleBar->setCurrentIndex( m_exception->hideTitleBar() );
m_ui.matchColorForTitleBar->setChecked( m_exception->matchColorForTitleBar() );
m_ui.drawBackgroundGradient->setChecked( m_exception->drawBackgroundGradient() );
m_ui.gradientOverrideLabelSpinBox->setValue( m_exception->gradientOverride() );
Expand All @@ -108,7 +108,7 @@ namespace Breeze
m_exception->setExceptionType( m_ui.exceptionType->currentIndex() );
m_exception->setExceptionPattern( m_ui.exceptionEditor->text() );
m_exception->setBorderSize( m_ui.borderSizeComboBox->currentIndex() );
m_exception->setHideTitleBar( m_ui.hideTitleBar->isChecked() );
m_exception->setHideTitleBar( m_ui.hideTitleBar->currentIndex() );
m_exception->setMatchColorForTitleBar( m_ui.matchColorForTitleBar->isChecked() );
m_exception->setDrawBackgroundGradient( m_ui.drawBackgroundGradient->isChecked() );
m_exception->setGradientOverride( m_ui.gradientOverrideLabelSpinBox->value() );
Expand All @@ -134,7 +134,7 @@ namespace Breeze
if( m_exception->exceptionType() != m_ui.exceptionType->currentIndex() ) modified = true;
else if( m_exception->exceptionPattern() != m_ui.exceptionEditor->text() ) modified = true;
else if( m_exception->borderSize() != m_ui.borderSizeComboBox->currentIndex() ) modified = true;
else if( m_exception->hideTitleBar() != m_ui.hideTitleBar->isChecked() ) modified = true;
else if( m_exception->hideTitleBar() != m_ui.hideTitleBar->currentIndex() ) modified = true;
else if( m_exception->matchColorForTitleBar() != m_ui.matchColorForTitleBar->isChecked() ) modified = true;
else if( m_exception->drawBackgroundGradient() != m_ui.drawBackgroundGradient->isChecked() ) modified = true;
else if( m_exception->gradientOverride() != m_ui.gradientOverrideLabelSpinBox->value() ) modified = true;
Expand Down
32 changes: 29 additions & 3 deletions config/ui/breezeconfigurationui.ui
Original file line number Diff line number Diff line change
Expand Up @@ -274,13 +274,38 @@
</item>
</widget>
</item>
<item row="5" column="1" colspan="10">
<widget class="QCheckBox" name="hideTitleBar">
<item row="5" column="1" alignment="Qt::AlignLeft">
<widget class="QLabel" name="label_14">
<property name="text">
<string>Hide Title Bar</string>
<string>Hide window title bar:</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
<property name="buddy">
<cstring>hideTitleBar</cstring>
</property>
</widget>
</item>
<item row="5" column="8">
<widget class="QComboBox" name="hideTitleBar">
<item>
<property name="text">
<string>Never</string>
</property>
</item>
<item>
<property name="text">
<string>Maximized Windows</string>
</property>
</item>
<item>
<property name="text">
<string>Always</string>
</property>
</item>
</widget>
</item>
<item row="6" column="1" colspan="10">
<widget class="QCheckBox" name="matchColorForTitleBar">
<property name="text">
Expand Down Expand Up @@ -809,6 +834,7 @@
</customwidgets>
<tabstops>
<tabstop>titleAlignment</tabstop>
<tabstop>hideTitleBar</tabstop>
<tabstop>buttonSize</tabstop>
<tabstop>buttonStyle</tabstop>
<tabstop>btnSpacingSpinBox</tabstop>
Expand Down
47 changes: 36 additions & 11 deletions config/ui/breezeexceptiondialog.ui
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
</property>
</widget>
</item>
<item row="2" column="2">
<item row="2" column="1" colspan="2">
<widget class="QPushButton" name="detectDialogButton">
<property name="text">
<string>Detect Window Properties</string>
Expand Down Expand Up @@ -90,7 +90,7 @@
</property>
</widget>
</item>
<item row="0" column="1">
<item row="0" column="1" colspan="2">
<widget class="QComboBox" name="borderSizeComboBox">
<property name="enabled">
<bool>false</bool>
Expand Down Expand Up @@ -149,7 +149,7 @@
 </property>
 </widget>
 </item>
 <item row="5" column="0" colspan="2">
<!--<item row="7" column="0" colspan="2">
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
Expand All @@ -161,14 +161,39 @@
</size>
</property>
</spacer>
</item>
<item row="1" column="0">
<widget class="QCheckBox" name="hideTitleBar">
<property name="text">
<string>Hide window title bar</string>
</property>
</widget>
</item>
</item>-->
<item row="1" column="0" alignment="Qt::AlignLeft">
<widget class="QLabel" name="label_3">
<property name="text">
<string>Hide window title bar:</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
<property name="buddy">
<cstring>hideTitleBar</cstring>
</property>
</widget>
</item>
<item row="1" column="1" colspan="2">
<widget class="QComboBox" name="hideTitleBar">
<item>
<property name="text">
<string>Never</string>
</property>
</item>
<item>
<property name="text">
<string>Maximized Windows</string>
</property>
</item>
<item>
<property name="text">
<string>Always</string>
</property>
</item>
</widget>
</item>
<item row="2" column="0">
<widget class="QCheckBox" name="matchColorForTitleBar">
<property name="text">
Expand Down

0 comments on commit c80471a

Please sign in to comment.