Skip to content
This repository has been archived by the owner on Nov 1, 2022. It is now read-only.

Commit

Permalink
fix #45 by incorporating pull request and remodelling the settings UI…
Browse files Browse the repository at this point in the history
…, also adding option to custom color every button individually
  • Loading branch information
n4n0GH committed Dec 13, 2019
1 parent 9a35130 commit d113878
Show file tree
Hide file tree
Showing 5 changed files with 838 additions and 425 deletions.
24 changes: 24 additions & 0 deletions window-decoration/kdecoration/config/helloconfigwidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,10 @@ namespace Hello
connect( m_ui.customMaxColor, SIGNAL(changed(QColor)), SLOT(updateChanged()) );
connect( m_ui.customShadeColor, SIGNAL(changed(QColor)), SLOT(updateChanged()) );
connect( m_ui.customOtherColor, SIGNAL(changed(QColor)), SLOT(updateChanged()) );
connect( m_ui.customAboveColor, SIGNAL(changed(QColor)), SLOT(updateChanged()) );
connect( m_ui.customBelowColor, SIGNAL(changed(QColor)), SLOT(updateChanged()) );
connect( m_ui.customPinColor, SIGNAL(changed(QColor)), SLOT(updateChanged()) );
connect( m_ui.customMenuColor, SIGNAL(changed(QColor)), SLOT(updateChanged()) );

// track animations changes
connect( m_ui.animationsEnabled, SIGNAL(clicked()), SLOT(updateChanged()) );
Expand Down Expand Up @@ -127,6 +131,11 @@ namespace Hello
m_ui.customMaxColor->setColor( m_internalSettings->customMaxColor() );
m_ui.customShadeColor->setColor( m_internalSettings->customShadeColor() );
m_ui.customOtherColor->setColor( m_internalSettings->customOtherColor() );
m_ui.customAboveColor->setColor( m_internalSettings->customAboveColor() );
m_ui.customBelowColor->setColor( m_internalSettings->customBelowColor() );
m_ui.customPinColor->setColor( m_internalSettings->customPinColor() );
m_ui.customMenuColor->setColor( m_internalSettings->customMenuColor() );

m_ui.buttonIconsBox->setCurrentIndex( m_internalSettings->buttonIconsBox() );

// load shadows
Expand Down Expand Up @@ -180,6 +189,11 @@ namespace Hello
m_internalSettings->setCustomMaxColor( m_ui.customMaxColor->color() );
m_internalSettings->setCustomShadeColor( m_ui.customShadeColor->color() );
m_internalSettings->setCustomOtherColor( m_ui.customOtherColor->color() );
m_internalSettings->setCustomBelowColor( m_ui.customBelowColor->color() );
m_internalSettings->setCustomAboveColor( m_ui.customAboveColor->color() );
m_internalSettings->setCustomPinColor( m_ui.customPinColor->color() );
m_internalSettings->setCustomMenuColor( m_ui.customMenuColor->color() );

m_internalSettings->setButtonIconsBox( m_ui.buttonIconsBox->currentIndex() );

m_internalSettings->setShadowSize( m_ui.shadowSize->currentIndex() );
Expand Down Expand Up @@ -246,6 +260,11 @@ namespace Hello
m_ui.customMaxColor->setColor( m_internalSettings->customMaxColor() );
m_ui.customShadeColor->setColor( m_internalSettings->customShadeColor() );
m_ui.customOtherColor->setColor( m_internalSettings->customOtherColor() );
m_ui.customAboveColor->setColor( m_internalSettings->customAboveColor() );
m_ui.customBelowColor->setColor( m_internalSettings->customBelowColor() );
m_ui.customPinColor->setColor( m_internalSettings->customPinColor() );
m_ui.customMenuColor->setColor( m_internalSettings->customMenuColor() );

m_ui.buttonIconsBox->setCurrentIndex( m_internalSettings->buttonIconsBox() );

m_ui.shadowSize->setCurrentIndex( m_internalSettings->shadowSize() );
Expand Down Expand Up @@ -290,6 +309,11 @@ namespace Hello
else if( m_ui.customMaxColor->color() != m_internalSettings->customMaxColor() ) modified = true;
else if( m_ui.customShadeColor->color() != m_internalSettings->customShadeColor() ) modified = true;
else if( m_ui.customOtherColor->color() != m_internalSettings->customOtherColor() ) modified = true;
else if( m_ui.customAboveColor->color() != m_internalSettings->customAboveColor() ) modified = true;
else if( m_ui.customBelowColor->color() != m_internalSettings->customBelowColor() ) modified = true;
else if( m_ui.customPinColor->color() != m_internalSettings->customPinColor() ) modified = true;
else if( m_ui.customMenuColor->color() != m_internalSettings->customMenuColor() ) modified = true;

else if( m_ui.buttonIconsBox->currentIndex() != m_internalSettings->buttonIconsBox() ) modified = true;

// animations
Expand Down
Loading

0 comments on commit d113878

Please sign in to comment.