Round all the things consistently
Now that we have Kirigami.Units.cornerRadius, there's a central source of truth for corner radius so don't have to use random numbers for these anymore. Part of https://invent.kde.org/teams/vdg/issues/-/issues/45.
This commit is contained in:
parent
c26101a9fe
commit
61ca42cd2c
9 changed files with 24 additions and 20 deletions
|
@ -9,7 +9,7 @@ import QtQuick.Layouts
|
|||
import QtQuick.Controls as QQC2
|
||||
|
||||
import org.kde.kcmutils as KCM
|
||||
import org.kde.kirigami 2.20 as Kirigami
|
||||
import org.kde.kirigami as Kirigami
|
||||
import org.kde.kwin.private.kdecoration as KDecoration
|
||||
|
||||
// Fake Window
|
||||
|
@ -22,7 +22,7 @@ Rectangle {
|
|||
readonly property bool hideDragHint: draggingTitlebarButtons || availableButtonsGrid.dragActive
|
||||
|
||||
color: palette.base
|
||||
radius: Kirigami.Units.smallSpacing
|
||||
radius: Kirigami.Units.cornerRadius
|
||||
|
||||
KDecoration.Bridge {
|
||||
id: bridgeItem
|
||||
|
@ -40,7 +40,7 @@ Rectangle {
|
|||
Rectangle {
|
||||
Layout.fillWidth: true
|
||||
implicitHeight: buttonPreviewRow.implicitHeight + 2 * baseLayout.titleBarSpacing
|
||||
radius: Kirigami.Units.smallSpacing
|
||||
radius: Kirigami.Units.cornerRadius
|
||||
gradient: Gradient {
|
||||
GradientStop { position: 0.0; color: palette.midlight }
|
||||
GradientStop { position: 1.0; color: palette.window }
|
||||
|
@ -68,7 +68,7 @@ Rectangle {
|
|||
color: "transparent"
|
||||
border.color: Kirigami.Theme.neutralTextColor
|
||||
border.width: 1
|
||||
radius: Kirigami.Units.smallSpacing
|
||||
radius: Kirigami.Units.cornerRadius
|
||||
}
|
||||
|
||||
KCM.SettingStateBinding {
|
||||
|
@ -97,7 +97,7 @@ Rectangle {
|
|||
color: "transparent"
|
||||
border.color: Kirigami.Theme.neutralTextColor
|
||||
border.width: 1
|
||||
radius: Kirigami.Units.smallSpacing
|
||||
radius: Kirigami.Units.cornerRadius
|
||||
}
|
||||
|
||||
KCM.SettingStateBinding {
|
||||
|
@ -190,7 +190,7 @@ Rectangle {
|
|||
Rectangle {
|
||||
Layout.alignment: Qt.AlignHCenter
|
||||
color: palette.window
|
||||
radius: Kirigami.Units.smallSpacing
|
||||
radius: Kirigami.Units.cornerRadius
|
||||
implicitWidth: baseLayout.buttonIconSize + Kirigami.Units.largeSpacing
|
||||
implicitHeight: baseLayout.buttonIconSize + Kirigami.Units.largeSpacing
|
||||
|
||||
|
|
|
@ -65,6 +65,8 @@ DecorationButton {
|
|||
width: size
|
||||
height: size
|
||||
Rectangle {
|
||||
// Intentionally not using Kirigami.Units.cornerRadius to mimic a
|
||||
// particular style
|
||||
radius: 2
|
||||
smooth: true
|
||||
anchors.fill: parent
|
||||
|
@ -79,6 +81,8 @@ DecorationButton {
|
|||
}
|
||||
}
|
||||
Rectangle {
|
||||
// Intentionally not using Kirigami.Units.cornerRadius to mimic a
|
||||
// particular style
|
||||
radius: 2
|
||||
smooth: true
|
||||
anchors {
|
||||
|
|
|
@ -139,7 +139,7 @@ Item {
|
|||
Rectangle {
|
||||
readonly property bool active: (delegate.activeFocus || dropArea.containsDrag || mouseArea.containsPress || bar.selectedDesktop === delegate.desktop)
|
||||
anchors.fill: parent
|
||||
radius: width / 20
|
||||
radius: Kirigami.Units.cornerRadius
|
||||
color: "transparent"
|
||||
border.width: active ? 2 : 1
|
||||
border.color: active ? Kirigami.Theme.highlightColor : Kirigami.Theme.textColor
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
import QtQuick
|
||||
import Qt5Compat.GraphicalEffects
|
||||
import QtQuick.Layouts
|
||||
import org.kde.kirigami 2.20 as Kirigami
|
||||
import org.kde.kirigami as Kirigami
|
||||
import org.kde.kwin as KWinComponents
|
||||
import org.kde.kwin.private.effects
|
||||
import org.kde.milou as Milou
|
||||
|
@ -527,7 +527,7 @@ FocusScope {
|
|||
color: "transparent"
|
||||
source: desktopElement
|
||||
|
||||
radius: Kirigami.Units.largeSpacing * 2 * (overviewVal + gridVal * 2)
|
||||
radius: Kirigami.Units.cornerRadius * (overviewVal + gridVal * 2)
|
||||
|
||||
shadow {
|
||||
size: Kirigami.Units.gridUnit * 2
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
import QtQuick
|
||||
import QtQuick.Window
|
||||
import Qt5Compat.GraphicalEffects
|
||||
import org.kde.kirigami 2.20 as Kirigami
|
||||
import org.kde.kirigami as Kirigami
|
||||
import org.kde.kwin as KWinComponents
|
||||
import org.kde.kwin.private.effects
|
||||
import org.kde.plasma.components 3.0 as PC3
|
||||
|
@ -136,7 +136,7 @@ Item {
|
|||
border.color: Kirigami.Theme.highlightColor
|
||||
anchors.fill: parent
|
||||
anchors.margins: -border.width
|
||||
radius: border.width
|
||||
radius: Kirigami.Units.cornerRadius
|
||||
color: "transparent"
|
||||
visible: !thumb.windowHeap.dragActive && (hoverHandler.hovered || (thumb.selected && Window.window.activeFocusItem)) && windowHeap.effectiveOrganized
|
||||
}
|
||||
|
|
|
@ -9,7 +9,7 @@ import Qt5Compat.GraphicalEffects
|
|||
import QtQuick.Layouts
|
||||
import org.kde.kwin as KWinComponents
|
||||
import org.kde.kwin.private.effects
|
||||
import org.kde.kirigami 2.20 as Kirigami
|
||||
import org.kde.kirigami as Kirigami
|
||||
|
||||
Rectangle {
|
||||
id: handle
|
||||
|
@ -23,7 +23,7 @@ Rectangle {
|
|||
implicitWidth: Kirigami.Units.gridUnit
|
||||
implicitHeight: Kirigami.Units.gridUnit
|
||||
|
||||
radius: 3
|
||||
radius: Kirigami.Units.cornerRadius
|
||||
color: Kirigami.Theme.highlightColor
|
||||
opacity: hoverHandler.hovered || dragHandler.active ? 0.4 : 0
|
||||
visible: tile &&
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
import QtQuick
|
||||
import org.kde.kwin as KWinComponents
|
||||
import org.kde.kwin.private.effects
|
||||
import org.kde.kirigami 2.20 as Kirigami
|
||||
import org.kde.kirigami as Kirigami
|
||||
|
||||
Rectangle {
|
||||
id: handle
|
||||
|
@ -25,7 +25,7 @@ Rectangle {
|
|||
implicitWidth: Kirigami.Units.smallSpacing * 2
|
||||
implicitHeight: Kirigami.Units.smallSpacing * 2
|
||||
|
||||
radius: 3
|
||||
radius: Kirigami.Units.cornerRadius
|
||||
color: Kirigami.Theme.highlightColor
|
||||
opacity: hoverHandler.hovered || dragHandler.active ? 0.4 : 0
|
||||
visible: valid && (tile.layoutDirection === KWinComponents.Tile.Floating || tile.positionInLayout > 0)
|
||||
|
|
|
@ -8,7 +8,7 @@ import QtQuick
|
|||
import QtQuick.Layouts
|
||||
import org.kde.kwin as KWinComponents
|
||||
import org.kde.kwin.private.effects
|
||||
import org.kde.kirigami 2.20 as Kirigami
|
||||
import org.kde.kirigami as Kirigami
|
||||
import org.kde.plasma.components 3.0 as PlasmaComponents
|
||||
|
||||
Item {
|
||||
|
@ -110,7 +110,7 @@ Item {
|
|||
margins: Kirigami.Units.smallSpacing
|
||||
}
|
||||
visible: tile.tiles.length === 0
|
||||
radius: 3
|
||||
radius: Kirigami.Units.cornerRadius
|
||||
opacity: tile.layoutDirection === KWinComponents.Tile.Floating ? 0.6 : 0.3
|
||||
color: tile.layoutDirection === KWinComponents.Tile.Floating ? Kirigami.Theme.backgroundColor : "transparent"
|
||||
border.color: Kirigami.Theme.textColor
|
||||
|
@ -119,7 +119,7 @@ Item {
|
|||
fill: parent
|
||||
margins: 1
|
||||
}
|
||||
radius: 3
|
||||
radius: Kirigami.Units.cornerRadius
|
||||
color: "transparent"
|
||||
border.color: Kirigami.Theme.backgroundColor
|
||||
}
|
||||
|
|
|
@ -9,7 +9,7 @@ import QtQuick
|
|||
import QtQuick.Layouts
|
||||
import QtQuick.Controls as QQC2
|
||||
|
||||
import org.kde.kirigami 2.12 as Kirigami
|
||||
import org.kde.kirigami as Kirigami
|
||||
|
||||
Rectangle {
|
||||
id: root
|
||||
|
@ -20,7 +20,7 @@ Rectangle {
|
|||
implicitHeight: layout.implicitHeight + 2 * layout.anchors.margins
|
||||
|
||||
color: Qt.rgba(0, 0, 0, effectFrame.frameOpacity)
|
||||
radius: layout.anchors.margins
|
||||
radius: Kirigami.Units.cornerRadius
|
||||
|
||||
RowLayout {
|
||||
id: layout
|
||||
|
|
Loading…
Reference in a new issue