mirror of
https://github.com/KDE/latte-dock.git
synced 2025-02-05 05:47:26 +03:00
add more colors to SchemeColors
This commit is contained in:
parent
1192760f28
commit
e1712dded4
@ -52,9 +52,34 @@ QColor SchemeColors::backgroundColor() const
|
|||||||
return subgroup() == Active ? m_activeBackgroundColor : m_inactiveBackgroundColor;
|
return subgroup() == Active ? m_activeBackgroundColor : m_inactiveBackgroundColor;
|
||||||
}
|
}
|
||||||
|
|
||||||
QColor SchemeColors::foregroundColor() const
|
QColor SchemeColors::textColor() const
|
||||||
{
|
{
|
||||||
return subgroup() == Active ? m_activeForegroundColor : m_inactiveForegroundColor;
|
return subgroup() == Active ? m_activeTextColor : m_inactiveTextColor;
|
||||||
|
}
|
||||||
|
|
||||||
|
QColor SchemeColors::highlightColor() const
|
||||||
|
{
|
||||||
|
return m_highlightColor;
|
||||||
|
}
|
||||||
|
|
||||||
|
QColor SchemeColors::highlightedTextColor() const
|
||||||
|
{
|
||||||
|
return m_highlightedTextColor;
|
||||||
|
}
|
||||||
|
|
||||||
|
QColor SchemeColors::positiveText() const
|
||||||
|
{
|
||||||
|
return m_positiveColor;
|
||||||
|
}
|
||||||
|
|
||||||
|
QColor SchemeColors::neutralText() const
|
||||||
|
{
|
||||||
|
return m_neutralText;
|
||||||
|
}
|
||||||
|
|
||||||
|
QColor SchemeColors::negativeText() const
|
||||||
|
{
|
||||||
|
return m_negativeText;
|
||||||
}
|
}
|
||||||
|
|
||||||
QString SchemeColors::schemeName()
|
QString SchemeColors::schemeName()
|
||||||
@ -124,12 +149,21 @@ void SchemeColors::updateScheme()
|
|||||||
|
|
||||||
KSharedConfigPtr filePtr = KSharedConfig::openConfig(m_schemeFile);
|
KSharedConfigPtr filePtr = KSharedConfig::openConfig(m_schemeFile);
|
||||||
KConfigGroup wmGroup = KConfigGroup(filePtr, "WM");
|
KConfigGroup wmGroup = KConfigGroup(filePtr, "WM");
|
||||||
|
KConfigGroup selGroup = KConfigGroup(filePtr, "Colors:Selection");
|
||||||
|
KConfigGroup viewGroup = KConfigGroup(filePtr, "Colors:View");
|
||||||
|
|
||||||
m_activeBackgroundColor = wmGroup.readEntry("activeBackground", QColor());
|
m_activeBackgroundColor = wmGroup.readEntry("activeBackground", QColor());
|
||||||
m_activeForegroundColor = wmGroup.readEntry("activeForeground", QColor());
|
m_activeTextColor = wmGroup.readEntry("activeForeground", QColor());
|
||||||
|
|
||||||
m_inactiveBackgroundColor = wmGroup.readEntry("inactiveBackground", QColor());
|
m_inactiveBackgroundColor = wmGroup.readEntry("inactiveBackground", QColor());
|
||||||
m_inactiveForegroundColor = wmGroup.readEntry("inactiveForeground", QColor());
|
m_inactiveTextColor = wmGroup.readEntry("inactiveForeground", QColor());
|
||||||
|
|
||||||
|
m_highlightColor = selGroup.readEntry("BackgroundNormal", QColor());
|
||||||
|
m_highlightedTextColor = selGroup.readEntry("ForegroundNormal", QColor());
|
||||||
|
|
||||||
|
m_positiveColor = selGroup.readEntry("ForegroundPositive", QColor());
|
||||||
|
m_neutralText = selGroup.readEntry("ForegroundNeutral", QColor());;
|
||||||
|
m_negativeText = selGroup.readEntry("ForegroundNegative", QColor());
|
||||||
|
|
||||||
emit colorsChanged();
|
emit colorsChanged();
|
||||||
}
|
}
|
||||||
|
@ -30,7 +30,12 @@ class SchemeColors: public QObject
|
|||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
Q_PROPERTY(QColor backgroundColor READ backgroundColor NOTIFY colorsChanged)
|
Q_PROPERTY(QColor backgroundColor READ backgroundColor NOTIFY colorsChanged)
|
||||||
Q_PROPERTY(QColor foregroundColor READ foregroundColor NOTIFY colorsChanged)
|
Q_PROPERTY(QColor textColor READ textColor NOTIFY colorsChanged)
|
||||||
|
Q_PROPERTY(QColor highlightColor READ highlightColor NOTIFY colorsChanged)
|
||||||
|
Q_PROPERTY(QColor highlightedTextColor READ highlightedTextColor NOTIFY colorsChanged)
|
||||||
|
Q_PROPERTY(QColor positiveText READ positiveText NOTIFY colorsChanged)
|
||||||
|
Q_PROPERTY(QColor neutralText READ neutralText NOTIFY colorsChanged)
|
||||||
|
Q_PROPERTY(QColor negativeText READ negativeText NOTIFY colorsChanged)
|
||||||
|
|
||||||
public:
|
public:
|
||||||
enum ColorsSubgroup
|
enum ColorsSubgroup
|
||||||
@ -47,7 +52,12 @@ public:
|
|||||||
QString schemeFile();
|
QString schemeFile();
|
||||||
|
|
||||||
QColor backgroundColor() const;
|
QColor backgroundColor() const;
|
||||||
QColor foregroundColor() const;
|
QColor textColor() const;
|
||||||
|
QColor highlightColor() const;
|
||||||
|
QColor highlightedTextColor() const;
|
||||||
|
QColor positiveText() const;
|
||||||
|
QColor neutralText() const;
|
||||||
|
QColor negativeText() const;
|
||||||
|
|
||||||
SchemeColors::ColorsSubgroup subgroup() const;
|
SchemeColors::ColorsSubgroup subgroup() const;
|
||||||
void setSubgroup(SchemeColors::ColorsSubgroup subgroup);
|
void setSubgroup(SchemeColors::ColorsSubgroup subgroup);
|
||||||
@ -65,10 +75,16 @@ private:
|
|||||||
QString m_schemeFile;
|
QString m_schemeFile;
|
||||||
|
|
||||||
QColor m_activeBackgroundColor;
|
QColor m_activeBackgroundColor;
|
||||||
QColor m_activeForegroundColor;
|
QColor m_activeTextColor;
|
||||||
|
|
||||||
QColor m_inactiveBackgroundColor;
|
QColor m_inactiveBackgroundColor;
|
||||||
QColor m_inactiveForegroundColor;
|
QColor m_inactiveTextColor;
|
||||||
|
|
||||||
|
QColor m_highlightColor;
|
||||||
|
QColor m_highlightedTextColor;
|
||||||
|
QColor m_positiveColor;
|
||||||
|
QColor m_neutralText;
|
||||||
|
QColor m_negativeText;
|
||||||
|
|
||||||
ColorsSubgroup m_subgroup{SchemeColors::Active};
|
ColorsSubgroup m_subgroup{SchemeColors::Active};
|
||||||
};
|
};
|
||||||
|
@ -1815,7 +1815,7 @@ DragDrop.DropArea {
|
|||||||
|
|
||||||
property color applyColor: {
|
property color applyColor: {
|
||||||
if (forceSolidnessAndColorize && dock.visibility.touchingWindowScheme) {
|
if (forceSolidnessAndColorize && dock.visibility.touchingWindowScheme) {
|
||||||
return dock.visibility.touchingWindowScheme.foregroundColor;
|
return dock.visibility.touchingWindowScheme.textColor;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (currentBackgroundLuminas>=0) {
|
if (currentBackgroundLuminas>=0) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user