diff --git a/CMakeLists.txt b/CMakeLists.txt index 91618bd..a80c7eb 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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) diff --git a/ChangeLog b/ChangeLog index 0aa6401..49908b9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +V0.6.3 +--------- + +* Three options for hiding window title bars (never, always and only for maximized windows) + V0.6.2 --------- diff --git a/breezedecoration.h b/breezedecoration.h index f0fc4db..482b763 100644 --- a/breezedecoration.h +++ b/breezedecoration.h @@ -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(); } diff --git a/breezesettingsdata.kcfg b/breezesettingsdata.kcfg index 39f5d41..e43476f 100644 --- a/breezesettingsdata.kcfg +++ b/breezesettingsdata.kcfg @@ -177,8 +177,13 @@ - - false + + + + + + + Never diff --git a/config/breezeconfigwidget.cpp b/config/breezeconfigwidget.cpp index cd79ac1..419859a 100644 --- a/config/breezeconfigwidget.cpp +++ b/config/breezeconfigwidget.cpp @@ -60,7 +60,7 @@ namespace Breeze connect( m_ui.opacitySpinBox, QOverload::of(&QSpinBox::valueChanged), [=](int /*i*/){updateChanged();} ); connect( m_ui.gradientSpinBox, QOverload::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(); } ); @@ -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(); @@ -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(); @@ -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() ); @@ -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) diff --git a/config/breezeexceptiondialog.cpp b/config/breezeexceptiondialog.cpp index bb60a08..8b0416f 100644 --- a/config/breezeexceptiondialog.cpp +++ b/config/breezeexceptiondialog.cpp @@ -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")); @@ -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() ); @@ -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() ); @@ -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; diff --git a/config/ui/breezeconfigurationui.ui b/config/ui/breezeconfigurationui.ui index f9ff626..4ef0053 100644 --- a/config/ui/breezeconfigurationui.ui +++ b/config/ui/breezeconfigurationui.ui @@ -274,13 +274,38 @@ - - + + - Hide Title Bar + Hide window title bar: + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + hideTitleBar + + + + + Never + + + + + Maximized Windows + + + + + Always + + + + @@ -809,6 +834,7 @@ titleAlignment + hideTitleBar buttonSize buttonStyle btnSpacingSpinBox diff --git a/config/ui/breezeexceptiondialog.ui b/config/ui/breezeexceptiondialog.ui index c641ece..794bc1d 100644 --- a/config/ui/breezeexceptiondialog.ui +++ b/config/ui/breezeexceptiondialog.ui @@ -46,7 +46,7 @@ - + Detect Window Properties @@ -90,7 +90,7 @@ - + false @@ -149,7 +149,7 @@  - + + + + + Hide window title bar: + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + hideTitleBar + + + + + + + + Never + + + + + Maximized Windows + + + + + Always + + + +