Skip to content

Commit

Permalink
Fix Margin for Favorites Grid, Add System Settings button in footer
Browse files Browse the repository at this point in the history
  • Loading branch information
prateekmedia committed Jul 3, 2021
1 parent 25ede4e commit 64f9449
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 6 deletions.
38 changes: 37 additions & 1 deletion contents/ui/Footer.qml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ import org.kde.kcoreaddons 1.0 as KCoreAddons
// at all to function, so there won't be any oddities with colours.
import org.kde.kirigami 2.13 as Kirigami
import org.kde.kquickcontrolsaddons 2.0 as KQuickAddons
import org.kde.plasma.private.quicklaunch 1.0

PlasmaExtras.PlasmoidHeading {
id: footer
Expand All @@ -51,6 +52,7 @@ PlasmaExtras.PlasmoidHeading {
KCoreAddons.KUser {
id: kuser
}
Logic { id: logic }
anchors.bottomMargin: units.largeSpacing * 2
anchors.topMargin: anchors.bottomMargin
anchors.leftMargin: -12
Expand Down Expand Up @@ -148,7 +150,7 @@ PlasmaExtras.PlasmoidHeading {
RowLayout {
anchors.rightMargin: units.largeSpacing * 3 - footer.rightPadding - footer.anchors.leftMargin
anchors.right: parent.right
x: -units.smallSpacing
x: -units.smallSpacing
anchors.verticalCenter: parent.verticalCenter

// looks visually balanced that way
Expand Down Expand Up @@ -189,6 +191,40 @@ PlasmaExtras.PlasmoidHeading {
}
}

PlasmaComponents.TabButton {
id: settingsButton
// flat: true
NumberAnimation {
id: animateSettingsOpacity
target: settingsButton
properties: "opacity"
from: 1
to: 0.5
duration: PlasmaCore.Units.longDuration
easing.type: Easing.InOutQuad
}
NumberAnimation {
id: animateSettingsOpacityReverse
target: settingsButton
properties: "opacity"
from: 0.5
to: 1
duration: PlasmaCore.Units.longDuration
easing.type: Easing.InOutQuad
}
icon.name: "configure"
onHoveredChanged: hovered ? animateSettingsOpacity.start() : animateSettingsOpacityReverse.start();
PlasmaComponents.ToolTip {
text: i18nc("@action", "System settings")
}
MouseArea {
onClicked: logic.openUrl("file:///usr/share/applications/systemsettings.desktop")
anchors.fill: parent
hoverEnabled: true
cursorShape: containsMouse ? Qt.PointingHandCursor : Qt.ArrowCursor
}
}

PlasmaComponents.TabButton {
id: leaveButton
NumberAnimation {
Expand Down
7 changes: 2 additions & 5 deletions contents/ui/MainColumnItem.qml
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ Item {
id: mainColumn
anchors {
top: searching ? searchField.bottom : mainLabelGrid.bottom
leftMargin: units.largeSpacing * 2
leftMargin: units.largeSpacing * 1.6
rightMargin: units.largeSpacing
topMargin: units.largeSpacing
left: parent.left
Expand Down Expand Up @@ -290,7 +290,7 @@ Item {
model: rootModel.modelForRow(2)
opacity: showAllApps && !searching ? 1.0 : 0.0
anchors {
leftMargin: units.largeSpacing * 2;
leftMargin: units.largeSpacing * 1.6;
}
onOpacityChanged: {
if (opacity == 1.0) {
Expand All @@ -304,9 +304,6 @@ Item {
anchors.fill: parent
z: (opacity == 1.0) ? 1 : 0
enabled: (opacity == 1.0) ? 1 : 0
anchors {
rightMargin: units.largeSpacing * 2;
}
width: parent.width
model: runnerModel
opacity: searching ? 1.0 : 0.0
Expand Down

0 comments on commit 64f9449

Please sign in to comment.