utilbuttons

This commit is contained in:
end-4
2025-04-10 12:55:26 +02:00
parent 91cef5700a
commit 15990bf8d1
6 changed files with 106 additions and 18 deletions
@@ -105,6 +105,10 @@ Singleton {
property color colOnLayer2: m3colors.m3onSurface;
property color colLayer3: mix(m3colors.m3surfaceContainerHigh, m3colors.m3onSurface, 0.96);
property color colOnLayer3: m3colors.m3onSurface;
property color colLayer2Hover: mix(colLayer2, colOnLayer2, 0.90);
property color colLayer2Active: mix(colLayer2, colOnLayer2, 0.80);
property color colLayer3Hover: mix(colLayer3, colOnLayer3, 0.90);
property color colLayer3Active: mix(colLayer3, colOnLayer3, 0.80);
}
rounding: QtObject {
@@ -119,7 +123,7 @@ Singleton {
font: QtObject {
property QtObject family: QtObject {
property string main: "Rubik"
property string title: "Gabarito"
property string title: "Rubik"
property string iconMaterial: "Material Symbols Rounded"
property string iconNerd: "SpaceMono NF"
property string monospace: "JetBrains Mono NF"
@@ -0,0 +1,11 @@
import "../"
import QtQuick
import QtQuick.Layouts
Text {
renderType: Text.NativeRendering
verticalAlignment: Text.AlignVCenter
font.family: Appearance.font.family.iconMaterial
font.pointSize: Appearance.font.pointSize.small
color: Appearance.colors.colOnBackground
}
@@ -0,0 +1,25 @@
import "../"
import QtQuick
import QtQuick.Controls
import QtQuick.Layouts
import Quickshell
import Quickshell.Io
import Quickshell.Wayland
Button {
id: button
implicitWidth: 26
implicitHeight: 26
required default property Item content
property bool extraActiveCondition: false
contentItem: content
background: Rectangle {
anchors.fill: parent
radius: Appearance.rounding.full
color: (button.down || extraActiveCondition) ? Appearance.colors.colLayer2Active : (button.hovered ? Appearance.colors.colLayer2Hover : Appearance.colors.colLayer2)
}
}
@@ -0,0 +1,11 @@
import "../"
import QtQuick
import QtQuick.Layouts
Text {
renderType: Text.NativeRendering
verticalAlignment: Text.AlignVCenter
font.family: Appearance.font.family.main
font.pointSize: Appearance.font.pointSize.small
color: Appearance.colors.colOnBackground
}