Skip to content

Commit

Permalink
Merge pull request #112 from DeltaCopy/bugfixes/transparency-settings
Browse files Browse the repository at this point in the history
Toolbar transparency settings
  • Loading branch information
Bali10050 authored Jan 29, 2025
2 parents ba26b53 + 95aecd8 commit 0342178
Show file tree
Hide file tree
Showing 4 changed files with 249 additions and 107 deletions.
10 changes: 10 additions & 0 deletions kstyle/config/darklystyleconfig.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,10 @@ StyleConfig::StyleConfig(QWidget *parent)
connect(_menuBarOpacity, SIGNAL(valueChanged(int)), _menuBarOpacitySpinBox, SLOT(setValue(int)));
connect(_menuBarOpacitySpinBox, SIGNAL(valueChanged(int)), _menuBarOpacity, SLOT(setValue(int)));

connect(_toolBarOpacity, &QAbstractSlider::valueChanged, this, &StyleConfig::updateChanged);
connect(_toolBarOpacity, SIGNAL(valueChanged(int)), _toolBarOpacitySpinBox, SLOT(setValue(int)));
connect(_toolBarOpacitySpinBox, SIGNAL(valueChanged(int)), _toolBarOpacity, SLOT(setValue(int)));

connect(_kTextEditDrawFrame, &QAbstractButton::toggled, this, &StyleConfig::updateChanged);
connect(_widgetDrawShadow, &QAbstractButton::toggled, this, &StyleConfig::updateChanged);
connect(_scrollableMenu, &QAbstractButton::toggled, this, &StyleConfig::updateChanged);
Expand Down Expand Up @@ -112,6 +116,7 @@ void StyleConfig::save()
StyleConfigData::setMenuOpacity(_menuOpacity->value());
StyleConfigData::setDolphinSidebarOpacity(_sidebarOpacity->value());
StyleConfigData::setMenuBarOpacity(_menuBarOpacity->value());
StyleConfigData::setToolBarOpacity(_toolBarOpacity->value());
StyleConfigData::setButtonSize(_buttonSize->value());
StyleConfigData::setKTextEditDrawFrame(_kTextEditDrawFrame->isChecked());
StyleConfigData::setWidgetDrawShadow(_widgetDrawShadow->isChecked());
Expand Down Expand Up @@ -197,6 +202,9 @@ void StyleConfig::updateChanged()
} else if (_menuBarOpacity->value() != StyleConfigData::menuBarOpacity()) {
modified = true;
_menuBarOpacitySpinBox->setValue(_menuBarOpacity->value());
} else if (_toolBarOpacity->value() != StyleConfigData::toolBarOpacity()) {
modified = true;
_toolBarOpacitySpinBox->setValue(_toolBarOpacity->value());
} else if (_kTextEditDrawFrame->isChecked() != StyleConfigData::kTextEditDrawFrame())
modified = true;
else if (_tabBarDrawCenteredTabs->isChecked() != StyleConfigData::tabBarDrawCenteredTabs())
Expand Down Expand Up @@ -249,6 +257,8 @@ void StyleConfig::load()
_tabBarDrawCenteredTabs->setChecked(StyleConfigData::tabBarDrawCenteredTabs());
_menuBarOpacity->setValue(StyleConfigData::menuBarOpacity());
_menuBarOpacitySpinBox->setValue(StyleConfigData::menuBarOpacity());
_toolBarOpacity->setValue(StyleConfigData::toolBarOpacity());
_toolBarOpacitySpinBox->setValue(StyleConfigData::toolBarOpacity());

_buttonSize->setValue(StyleConfigData::buttonSize());
_kTextEditDrawFrame->setChecked(StyleConfigData::kTextEditDrawFrame());
Expand Down
Loading

0 comments on commit 0342178

Please sign in to comment.