drop outline width exposure through gui

work/spdx
Michail Vourlakos 4 years ago
parent 597ee4af5f
commit 156103af4f

@ -30,7 +30,6 @@ const bool Preferences::BORDERLESSMAXIMIZED;
const bool Preferences::METAPRESSFORAPPLAUNCHER;
const bool Preferences::METAHOLDFORBADGES;
const int Preferences::SCREENSDELAY;
const int Preferences::OUTLINEWIDTH;
const Settings::MouseSensitivity Preferences::MOUSESENSITIVITY;
Preferences::Preferences()
@ -45,8 +44,7 @@ Preferences::Preferences(Preferences &&o)
metaPressForAppLauncher(o.metaPressForAppLauncher),
metaHoldForBadges(o.metaHoldForBadges),
mouseSensitivity(o.mouseSensitivity),
screensDelay(o.screensDelay),
outlineWidth(o.outlineWidth)
screensDelay(o.screensDelay)
{
}
@ -58,8 +56,7 @@ Preferences::Preferences(const Preferences &o)
metaPressForAppLauncher(o.metaPressForAppLauncher),
metaHoldForBadges(o.metaHoldForBadges),
mouseSensitivity(o.mouseSensitivity),
screensDelay(o.screensDelay),
outlineWidth(o.outlineWidth)
screensDelay(o.screensDelay)
{
}
@ -73,7 +70,6 @@ Preferences &Preferences::operator=(const Preferences &rhs)
metaHoldForBadges = rhs.metaHoldForBadges;
mouseSensitivity = rhs.mouseSensitivity;
screensDelay = rhs.screensDelay;
outlineWidth = rhs.outlineWidth;
return (*this);
}
@ -88,7 +84,6 @@ Preferences &Preferences::operator=(Preferences &&rhs)
metaHoldForBadges = rhs.metaHoldForBadges;
mouseSensitivity = rhs.mouseSensitivity;
screensDelay = rhs.screensDelay;
outlineWidth = rhs.outlineWidth;
return (*this);
}
@ -102,8 +97,7 @@ bool Preferences::operator==(const Preferences &rhs) const
&& (metaPressForAppLauncher == rhs.metaPressForAppLauncher)
&& (metaHoldForBadges == rhs.metaHoldForBadges)
&& (mouseSensitivity == rhs.mouseSensitivity)
&& (screensDelay == rhs.screensDelay)
&& (outlineWidth == rhs.outlineWidth);
&& (screensDelay == rhs.screensDelay);
}
bool Preferences::operator!=(const Preferences &rhs) const
@ -120,8 +114,7 @@ bool Preferences::inDefaultValues() const
&& (metaPressForAppLauncher == METAPRESSFORAPPLAUNCHER)
&& (metaHoldForBadges == METAHOLDFORBADGES)
&& (mouseSensitivity == MOUSESENSITIVITY)
&& (screensDelay == SCREENSDELAY)
&& (outlineWidth == OUTLINEWIDTH);
&& (screensDelay == SCREENSDELAY);
}
void Preferences::setToDefaults()
@ -134,7 +127,6 @@ void Preferences::setToDefaults()
metaHoldForBadges = METAHOLDFORBADGES;
mouseSensitivity = MOUSESENSITIVITY;
screensDelay = SCREENSDELAY;
outlineWidth = OUTLINEWIDTH;
}

@ -37,7 +37,6 @@ public:
static const bool METAPRESSFORAPPLAUNCHER = false;
static const bool METAHOLDFORBADGES = true;
static const int SCREENSDELAY = 2500;
static const int OUTLINEWIDTH = 1;
static const Settings::MouseSensitivity MOUSESENSITIVITY = Settings::HighMouseSensitivity;
Preferences();
@ -52,7 +51,6 @@ public:
bool metaPressForAppLauncher{METAPRESSFORAPPLAUNCHER};
bool metaHoldForBadges{METAHOLDFORBADGES};
int screensDelay{SCREENSDELAY};
int outlineWidth{OUTLINEWIDTH};
Settings::MouseSensitivity mouseSensitivity{MOUSESENSITIVITY};
bool inDefaultValues() const;

@ -522,7 +522,7 @@
<x>0</x>
<y>0</y>
<width>1068</width>
<height>375</height>
<height>344</height>
</rect>
</property>
<property name="sizePolicy">
@ -729,77 +729,7 @@
</layout>
</item>
<item row="15" column="1">
<layout class="QHBoxLayout" name="plasmaThemeRowLayout">
<item>
<widget class="QSpinBox" name="outlineSpinBox">
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>70</width>
<height>0</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>110</width>
<height>16777215</height>
</size>
</property>
<property name="toolTip">
<string>Outline width used from background to draw its borders</string>
</property>
<property name="suffix">
<string> px.</string>
</property>
<property name="minimum">
<number>1</number>
</property>
<property name="maximum">
<number>20</number>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="outlineLbl">
<property name="enabled">
<bool>true</bool>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="toolTip">
<string>Outline width used from background to draw its borders</string>
</property>
<property name="text">
<string>outline width </string>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer_16">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Expanding</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
</layout>
<layout class="QHBoxLayout" name="plasmaThemeRowLayout"/>
</item>
<item row="14" column="1">
<spacer name="verticalSpacer_11">
@ -914,37 +844,7 @@
</widget>
</item>
<item row="15" column="0">
<layout class="QHBoxLayout" name="plasmaThemeHeaderRowLayout">
<item>
<spacer name="horizontalSpacer_10">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QLabel" name="plasmaLbl">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Plasma Theme:</string>
</property>
<property name="alignment">
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
</property>
</widget>
</item>
</layout>
<layout class="QHBoxLayout" name="plasmaThemeHeaderRowLayout"/>
</item>
<item row="0" column="1">
<widget class="QCheckBox" name="badges3DStyleChkBox">

@ -68,11 +68,6 @@ void TabPreferences::initUi()
emit dataChanged();
});
connect(m_ui->outlineSpinBox, QOverload<int>::of(&QSpinBox::valueChanged), [ = ](int i) {
m_preferences.outlineWidth = m_ui->outlineSpinBox->value();
emit dataChanged();
});
connect(m_ui->autostartChkBox, &QCheckBox::stateChanged, this, [&]() {
m_preferences.autostart = m_ui->autostartChkBox->isChecked();
emit dataChanged();
@ -119,7 +114,6 @@ void TabPreferences::initSettings()
o_preferences.borderlessMaximized = m_corona->universalSettings()->canDisableBorders();
o_preferences.mouseSensitivity = m_corona->universalSettings()->sensitivity();
o_preferences.screensDelay = m_corona->universalSettings()->screenTrackerInterval();
o_preferences.outlineWidth = m_corona->themeExtended()->outlineWidth();
m_preferences = o_preferences;
@ -136,7 +130,6 @@ void TabPreferences::updateUi()
m_ui->metaPressHoldChkBox->setChecked(m_preferences.metaHoldForBadges);
m_ui->noBordersForMaximizedChkBox->setChecked(m_preferences.borderlessMaximized);
m_ui->screenTrackerSpinBox->setValue(m_preferences.screensDelay);
m_ui->outlineSpinBox->setValue(m_preferences.outlineWidth);
if (m_preferences.mouseSensitivity == Settings::LowMouseSensitivity) {
m_ui->lowSensitivityBtn->setChecked(true);
@ -181,7 +174,6 @@ void TabPreferences::save()
m_corona->universalSettings()->setShowInfoWindow(m_preferences.layoutsInformationWindow);
m_corona->universalSettings()->setCanDisableBorders(m_preferences.borderlessMaximized);
m_corona->universalSettings()->setScreenTrackerInterval(m_preferences.screensDelay);
m_corona->themeExtended()->setOutlineWidth(m_preferences.outlineWidth);
o_preferences = m_preferences;
emit dataChanged();

Loading…
Cancel
Save