Changeset View
Changeset View
Standalone View
Standalone View
liboxygen/oxygenshadowconfigwidget.cpp
Show First 20 Lines • Show All 68 Lines • ▼ Show 20 Line(s) | 68 | { | |||
---|---|---|---|---|---|
69 | 69 | | |||
70 | ActiveShadowConfiguration::setShadowSize( ui->shadowSize->value() ); | 70 | ActiveShadowConfiguration::setShadowSize( ui->shadowSize->value() ); | ||
71 | ActiveShadowConfiguration::setVerticalOffset( 0.1*ui->verticalOffset->value() ); | 71 | ActiveShadowConfiguration::setVerticalOffset( 0.1*ui->verticalOffset->value() ); | ||
72 | ActiveShadowConfiguration::setInnerColor( ui->innerColor->color() ); | 72 | ActiveShadowConfiguration::setInnerColor( ui->innerColor->color() ); | ||
73 | ActiveShadowConfiguration::setOuterColor( ui->outerColor->color() ); | 73 | ActiveShadowConfiguration::setOuterColor( ui->outerColor->color() ); | ||
74 | ActiveShadowConfiguration::setUseOuterColor( ui->useOuterColor->isChecked() ); | 74 | ActiveShadowConfiguration::setUseOuterColor( ui->useOuterColor->isChecked() ); | ||
75 | 75 | | |||
76 | ActiveShadowConfiguration::setEnabled( isChecked() ); | 76 | ActiveShadowConfiguration::setEnabled( isChecked() ); | ||
77 | #if OXYGEN_USE_KDE4 | | |||
78 | ActiveShadowConfiguration::self()->writeConfig(); | | |||
79 | #else | | |||
80 | ActiveShadowConfiguration::self()->save(); | 77 | ActiveShadowConfiguration::self()->save(); | ||
81 | #endif | | |||
82 | 78 | | |||
83 | } else if( _group == QPalette::Inactive ) { | 79 | } else if( _group == QPalette::Inactive ) { | ||
84 | 80 | | |||
85 | InactiveShadowConfiguration::setShadowSize( ui->shadowSize->value() ); | 81 | InactiveShadowConfiguration::setShadowSize( ui->shadowSize->value() ); | ||
86 | InactiveShadowConfiguration::setVerticalOffset( 0.1*ui->verticalOffset->value() ); | 82 | InactiveShadowConfiguration::setVerticalOffset( 0.1*ui->verticalOffset->value() ); | ||
87 | InactiveShadowConfiguration::setInnerColor( ui->innerColor->color() ); | 83 | InactiveShadowConfiguration::setInnerColor( ui->innerColor->color() ); | ||
88 | InactiveShadowConfiguration::setOuterColor( ui->outerColor->color() ); | 84 | InactiveShadowConfiguration::setOuterColor( ui->outerColor->color() ); | ||
89 | InactiveShadowConfiguration::setUseOuterColor( ui->useOuterColor->isChecked() ); | 85 | InactiveShadowConfiguration::setUseOuterColor( ui->useOuterColor->isChecked() ); | ||
90 | 86 | | |||
91 | InactiveShadowConfiguration::setEnabled( isChecked() ); | 87 | InactiveShadowConfiguration::setEnabled( isChecked() ); | ||
92 | #if OXYGEN_USE_KDE4 | | |||
93 | InactiveShadowConfiguration::self()->writeConfig(); | | |||
94 | #else | | |||
95 | InactiveShadowConfiguration::self()->save(); | 88 | InactiveShadowConfiguration::self()->save(); | ||
96 | #endif | | |||
97 | 89 | | |||
98 | } | 90 | } | ||
99 | 91 | | |||
100 | } | 92 | } | ||
101 | 93 | | |||
102 | //_________________________________________________________ | 94 | //_________________________________________________________ | ||
103 | void ShadowConfigWidget::updateChanged( void ) | 95 | void ShadowConfigWidget::updateChanged( void ) | ||
104 | { | 96 | { | ||
Show All 26 Lines | |||||
131 | void ShadowConfigWidget::load( bool defaults ) | 123 | void ShadowConfigWidget::load( bool defaults ) | ||
132 | { | 124 | { | ||
133 | if( _group == QPalette::Active ) | 125 | if( _group == QPalette::Active ) | ||
134 | { | 126 | { | ||
135 | 127 | | |||
136 | if( defaults ) ActiveShadowConfiguration::self()->setDefaults(); | 128 | if( defaults ) ActiveShadowConfiguration::self()->setDefaults(); | ||
137 | else { | 129 | else { | ||
138 | 130 | | |||
139 | #if OXYGEN_USE_KDE4 | | |||
140 | ActiveShadowConfiguration::self()->readConfig(); | | |||
141 | #else | | |||
142 | ActiveShadowConfiguration::self()->load(); | 131 | ActiveShadowConfiguration::self()->load(); | ||
143 | #endif | | |||
144 | 132 | | |||
145 | } | 133 | } | ||
146 | 134 | | |||
147 | ui->shadowSize->setValue( ActiveShadowConfiguration::shadowSize() ); | 135 | ui->shadowSize->setValue( ActiveShadowConfiguration::shadowSize() ); | ||
148 | ui->verticalOffset->setValue( 10*ActiveShadowConfiguration::verticalOffset() ); | 136 | ui->verticalOffset->setValue( 10*ActiveShadowConfiguration::verticalOffset() ); | ||
149 | ui->innerColor->setColor( ActiveShadowConfiguration::innerColor() ); | 137 | ui->innerColor->setColor( ActiveShadowConfiguration::innerColor() ); | ||
150 | ui->outerColor->setColor( ActiveShadowConfiguration::outerColor() ); | 138 | ui->outerColor->setColor( ActiveShadowConfiguration::outerColor() ); | ||
151 | ui->useOuterColor->setChecked( ActiveShadowConfiguration::useOuterColor() ); | 139 | ui->useOuterColor->setChecked( ActiveShadowConfiguration::useOuterColor() ); | ||
152 | 140 | | |||
153 | setChecked( ActiveShadowConfiguration::enabled() ); | 141 | setChecked( ActiveShadowConfiguration::enabled() ); | ||
154 | 142 | | |||
155 | } else if( _group == QPalette::Inactive ) { | 143 | } else if( _group == QPalette::Inactive ) { | ||
156 | 144 | | |||
157 | if( defaults ) InactiveShadowConfiguration::self()->setDefaults(); | 145 | if( defaults ) InactiveShadowConfiguration::self()->setDefaults(); | ||
158 | else { | 146 | else { | ||
159 | 147 | | |||
160 | #if OXYGEN_USE_KDE4 | | |||
161 | InactiveShadowConfiguration::self()->readConfig(); | | |||
162 | #else | | |||
163 | InactiveShadowConfiguration::self()->load(); | 148 | InactiveShadowConfiguration::self()->load(); | ||
164 | #endif | | |||
165 | 149 | | |||
166 | } | 150 | } | ||
167 | 151 | | |||
168 | ui->shadowSize->setValue( InactiveShadowConfiguration::shadowSize() ); | 152 | ui->shadowSize->setValue( InactiveShadowConfiguration::shadowSize() ); | ||
169 | ui->verticalOffset->setValue( 10*InactiveShadowConfiguration::verticalOffset() ); | 153 | ui->verticalOffset->setValue( 10*InactiveShadowConfiguration::verticalOffset() ); | ||
170 | ui->innerColor->setColor( InactiveShadowConfiguration::innerColor() ); | 154 | ui->innerColor->setColor( InactiveShadowConfiguration::innerColor() ); | ||
171 | ui->outerColor->setColor( InactiveShadowConfiguration::outerColor() ); | 155 | ui->outerColor->setColor( InactiveShadowConfiguration::outerColor() ); | ||
172 | ui->useOuterColor->setChecked( InactiveShadowConfiguration::useOuterColor() ); | 156 | ui->useOuterColor->setChecked( InactiveShadowConfiguration::useOuterColor() ); | ||
173 | 157 | | |||
174 | setChecked( InactiveShadowConfiguration::enabled() ); | 158 | setChecked( InactiveShadowConfiguration::enabled() ); | ||
175 | 159 | | |||
176 | } | 160 | } | ||
177 | 161 | | |||
178 | } | 162 | } | ||
179 | 163 | | |||
180 | } | 164 | } |