Commit 66aaaf72 authored by Arjen Hiemstra's avatar Arjen Hiemstra
Browse files

Use a fixed icon size for the notification popup close button

Both the popup header size as well as units.smallMargin depend on font
size. This causes problems with the new circular timeout indicator.
Rather than trying to somehow fix the margins, this patch changes things
to use units.iconSizes.smallMedium as close button icon size instead,
stopping it from relying on font size and hopefully fixing any layout

Test Plan: Change font size to 10/11/12 pt. Icon size remains the same.

Reviewers: #plasma, #vdg, ndavis, ngraham

Reviewed By: #vdg, ndavis, ngraham

Subscribers: ndavis, plasma-devel

Tags: #plasma

Differential Revision:
parent 21a89dd6
......@@ -207,15 +207,17 @@ RowLayout {
onClicked: notificationHeading.closeClicked()
PlasmaCore.IconItem {
anchors.fill: parent
anchors.margins: units.smallSpacing + units.devicePixelRatio * 2
anchors.centerIn: parent
width: units.iconSizes.smallMedium
height: width
source: "window-close"
roundToIconSize: false
active: closeButton.hovered
Charts.PieChart {
anchors.fill: parent
anchors.margins: -units.devicePixelRatio
anchors.margins: -Math.round(units.devicePixelRatio)
opacity: (notificationHeading.remainingTime > 0 && notificationHeading.remainingTime < notificationHeading.timeout) ? 1 : 0
Behavior on opacity {
......@@ -229,7 +231,7 @@ RowLayout {
backgroundColor: theme.highlightColor
thickness: units.devicePixelRatio * 5
thickness: Math.round(units.devicePixelRatio) * 5
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment