mirror of
https://github.com/KDE/latte-dock.git
synced 2025-03-23 02:50:12 +03:00
update option for Plasma Background Roundness
--that option now supports also Automatic in order for Latte background parts to use the Latte heuristics in order to identify the proper roundness
This commit is contained in:
parent
6a235244b3
commit
e780184d0c
@ -85,27 +85,27 @@ bool Theme::isDarkTheme() const
|
||||
|
||||
int Theme::bottomEdgeRoundness() const
|
||||
{
|
||||
return (themeHasExtendedInfo() ? m_bottomEdgeRoundness : userThemeRoundness());
|
||||
return ((themeHasExtendedInfo() && m_userRoundness == -1) ? m_bottomEdgeRoundness : userThemeRoundness());
|
||||
}
|
||||
|
||||
int Theme::leftEdgeRoundness() const
|
||||
{
|
||||
return (themeHasExtendedInfo() ? m_leftEdgeRoundness : userThemeRoundness());
|
||||
return ((themeHasExtendedInfo() && m_userRoundness == -1) ? m_leftEdgeRoundness : userThemeRoundness());
|
||||
}
|
||||
|
||||
int Theme::topEdgeRoundness() const
|
||||
{
|
||||
return (themeHasExtendedInfo() ? m_topEdgeRoundness : userThemeRoundness());
|
||||
return ((themeHasExtendedInfo() && m_userRoundness == -1) ? m_topEdgeRoundness : userThemeRoundness());
|
||||
}
|
||||
|
||||
int Theme::rightEdgeRoundness() const
|
||||
{
|
||||
return (themeHasExtendedInfo() ? m_rightEdgeRoundness : userThemeRoundness());
|
||||
return ((themeHasExtendedInfo() && m_userRoundness == -1) ? m_rightEdgeRoundness : userThemeRoundness());
|
||||
}
|
||||
|
||||
int Theme::userThemeRoundness() const
|
||||
{
|
||||
return m_userRoundness;
|
||||
return qMax(0, m_userRoundness);
|
||||
}
|
||||
|
||||
void Theme::setUserThemeRoundness(int roundness)
|
||||
@ -116,9 +116,7 @@ void Theme::setUserThemeRoundness(int roundness)
|
||||
|
||||
m_userRoundness = roundness;
|
||||
|
||||
if (!themeHasExtendedInfo()) {
|
||||
emit roundnessChanged();
|
||||
}
|
||||
emit roundnessChanged();
|
||||
|
||||
saveConfig();
|
||||
}
|
||||
@ -397,7 +395,7 @@ void Theme::loadThemeLightness()
|
||||
|
||||
void Theme::loadConfig()
|
||||
{
|
||||
m_userRoundness = m_themeGroup.readEntry("userSetPlasmaThemeRoundness", 0);
|
||||
setUserThemeRoundness(m_themeGroup.readEntry("userSetPlasmaThemeRoundness", -1));
|
||||
}
|
||||
|
||||
void Theme::saveConfig()
|
||||
|
@ -113,7 +113,7 @@ private:
|
||||
int m_leftEdgeRoundness{0};
|
||||
int m_topEdgeRoundness{0};
|
||||
int m_rightEdgeRoundness{0};
|
||||
int m_userRoundness{0};
|
||||
int m_userRoundness{-1};
|
||||
|
||||
QString m_themePath;
|
||||
QString m_defaultSchemePath;
|
||||
|
@ -136,6 +136,7 @@ SettingsDialog::SettingsDialog(QWidget *parent, Latte::Corona *corona)
|
||||
m_mouseSensitivityButtons->setExclusive(true);
|
||||
|
||||
ui->screenTrackerSpinBox->setValue(m_corona->universalSettings()->screenTrackerInterval());
|
||||
ui->themeRoundnessSpinBox->setSpecialValueText(i18nc("automatic background roundness","Automatic"));
|
||||
ui->themeRoundnessSpinBox->setValue(m_corona->themeExtended()->userThemeRoundness());
|
||||
|
||||
//! About Menu
|
||||
|
@ -946,11 +946,10 @@ This tracker is used in order to not lose any screen related update.</string>
|
||||
<item>
|
||||
<widget class="QLabel" name="plasmaRoundnessLbl">
|
||||
<property name="toolTip">
|
||||
<string>Roundness used from Latte elements in order to feel part of the current plasma theme
|
||||
when there are no other roundness information.</string>
|
||||
<string>Roundness used from Latte elements in order to feel part of the current plasma theme</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>User set background roundness</string>
|
||||
<string>Background roundness</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
@ -978,8 +977,11 @@ when there are no other roundness information.</string>
|
||||
<property name="suffix">
|
||||
<string> px.</string>
|
||||
</property>
|
||||
<property name="minimum">
|
||||
<number>-1</number>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<number>24</number>
|
||||
<number>32</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
|
Loading…
x
Reference in New Issue
Block a user