diff --git a/app/settings/detailsdialog/detailsdialog.ui b/app/settings/detailsdialog/detailsdialog.ui
index 2b90d2fd8..f14a7aeb5 100644
--- a/app/settings/detailsdialog/detailsdialog.ui
+++ b/app/settings/detailsdialog/detailsdialog.ui
@@ -6,8 +6,8 @@
0
0
- 561
- 630
+ 580
+ 619
@@ -35,32 +35,38 @@
-
-
-
-
-
-
-
-
- 0
- 0
-
+
+
-
+
+
+ Qt::Vertical
-
+
+ QSizePolicy::Fixed
+
+
- 20
+ 15
20
-
-
-
-
+
- -
-
-
-
+
-
+
+
+ Qt::Vertical
-
+
+ QSizePolicy::Fixed
+
+
+
+ 15
+ 20
+
+
+
-
@@ -89,6 +95,62 @@
+ -
+
+
+ Qt::Vertical
+
+
+ QSizePolicy::Fixed
+
+
+
+ 15
+ 20
+
+
+
+
+ -
+
+
-
+
+
+ Qt::Horizontal
+
+
+
+ 40
+ 20
+
+
+
+
+ -
+
+
+ Layout:
+
+
+
+
+
+ -
+
+
+ Qt::Vertical
+
+
+ QSizePolicy::Fixed
+
+
+
+ 20
+ 10
+
+
+
+
-
@@ -114,8 +176,35 @@
- -
-
+
-
+
+
-
+
+
+
+ 358
+ 0
+
+
+
+
+ -
+
+
+ Qt::Horizontal
+
+
+
+ 40
+ 20
+
+
+
+
+
+
+ -
+
Qt::Vertical
@@ -124,12 +213,46 @@
- 20
- 10
+ 15
+ 20
+ -
+
+
-
+
+
+
+ 358
+ 60
+
+
+
+
+ -
+
+
+ Qt::Horizontal
+
+
+
+ 40
+ 20
+
+
+
+
+
+
+ -
+
+
+ Hide window borders for maximized windows
+
+
+
-
-
@@ -157,6 +280,43 @@
+ -
+
+
-
+
+
+ Qt::Horizontal
+
+
+
+ 40
+ 20
+
+
+
+
+ -
+
+
+ Behavior:
+
+
+
+
+
+ -
+
+
+
+ 16777215
+ 16777215
+
+
+
+ Show in layouts context menu when possible
+
+
+
-
-
@@ -226,29 +386,19 @@
- -
-
-
-
-
-
- Qt::Horizontal
-
-
-
- 40
- 20
-
-
-
-
- -
-
-
- Behavior:
-
-
-
-
+ -
+
+
+
+
+
+
+ -
+
+
+
+
+
-
@@ -320,53 +470,10 @@
- -
-
-
- Qt::Vertical
-
-
- QSizePolicy::Fixed
-
-
-
- 15
- 20
-
-
-
-
- -
-
-
-
-
-
-
- 358
- 60
-
-
-
-
- -
-
-
- Qt::Horizontal
-
-
-
- 40
- 20
-
-
-
-
-
-
- -
-
+
-
+
-
-
+
Qt::Horizontal
@@ -379,37 +486,14 @@
-
-
+
- Layout:
+ Icon:
- -
-
-
- Qt::Vertical
-
-
- QSizePolicy::Fixed
-
-
-
- 15
- 20
-
-
-
-
- -
-
-
-
-
-
-
-
-
@@ -440,10 +524,29 @@
- -
-
+
-
+
+
+
+ 0
+ 0
+
+
+
+
+ 20
+ 20
+
+
+
+
+
+
+
+ -
+
-
-
+
Qt::Horizontal
@@ -456,44 +559,61 @@
-
-
+
- Icon:
+ PopUp Margin:
- -
-
-
- Qt::Vertical
-
-
- QSizePolicy::Fixed
-
-
-
- 15
- 20
-
-
-
-
- -
-
+
-
+
-
-
+
+
+
+ 0
+ 0
+
+
- 358
+ 85
0
+
+
+ 16777215
+ 16777215
+
+
+
+ Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter
+
+
+ disabled
+
+
+ px.
+
+
+
+
+
+ -1
+
+
+ 50
+
+
+ -1
+
-
-
+
Qt::Horizontal
@@ -507,26 +627,6 @@
- -
-
-
-
- 16777215
- 16777215
-
-
-
- Show in layouts context menu when possible
-
-
-
- -
-
-
- Hide window borders for maximized windows
-
-
-
diff --git a/app/settings/detailsdialog/detailshandler.cpp b/app/settings/detailsdialog/detailshandler.cpp
index dfc124c14..92a5cce95 100644
--- a/app/settings/detailsdialog/detailshandler.cpp
+++ b/app/settings/detailsdialog/detailshandler.cpp
@@ -97,6 +97,10 @@ void DetailsHandler::init()
//! Options
+ connect(m_ui->popUpMarginSpinBox, qOverload(&QSpinBox::valueChanged), this, [&](int i) {
+ setPopUpMargin(i);
+ });
+
connect(m_ui->inMenuChk, &QCheckBox::stateChanged, this, [&]() {
setIsShownInMenu(m_ui->inMenuChk->isChecked());
});
@@ -196,6 +200,8 @@ void DetailsHandler::loadLayout(const Latte::Data::Layout &data)
m_ui->patternClearBtn->setEnabled(false);
}
+ m_ui->popUpMarginSpinBox->setValue(data.popUpMargin);
+
m_ui->inMenuChk->setChecked(data.isShownInMenu);
m_ui->borderlessChk->setChecked(data.hasDisabledBorders);
@@ -357,6 +363,16 @@ void DetailsHandler::setBackgroundStyle(const Latte::Layout::BackgroundStyle &st
emit dataChanged();
}
+void DetailsHandler::setPopUpMargin(const int &margin)
+{
+ if (c_data.popUpMargin == margin) {
+ return;
+ }
+
+ c_data.popUpMargin = margin;
+ emit dataChanged();
+}
+
void DetailsHandler::selectBackground()
{
QStringList mimeTypeFilters;
diff --git a/app/settings/detailsdialog/detailshandler.h b/app/settings/detailsdialog/detailshandler.h
index 0ce206af0..c11dad528 100644
--- a/app/settings/detailsdialog/detailshandler.h
+++ b/app/settings/detailsdialog/detailshandler.h
@@ -105,6 +105,8 @@ private:
void setColor(const QString &color);
void setIcon(const QString &icon);
+ void setPopUpMargin(const int &margin);
+
void setBackgroundStyle(const Latte::Layout::BackgroundStyle &style);
void loadLayout(const Latte::Data::Layout &data);