mirror of
https://github.com/kossLAN/dots.git
synced 2025-11-05 06:59:50 -05:00
Initial commit
This commit is contained in:
commit
05cd51b54e
148 changed files with 10112 additions and 0 deletions
74
.stversions/bar/control/ControlButton~20250307-175400.qml
Normal file
74
.stversions/bar/control/ControlButton~20250307-175400.qml
Normal file
|
|
@ -0,0 +1,74 @@
|
|||
import QtQuick
|
||||
import QtQuick.Layouts
|
||||
import QtQuick.Effects
|
||||
import Quickshell.Widgets
|
||||
import "../.."
|
||||
|
||||
Item {
|
||||
property string source;
|
||||
property string text: "";
|
||||
property string subText: "";
|
||||
property real implicitSize; // icon implicit size
|
||||
property real padding: 0;
|
||||
property real radius: 5;
|
||||
signal clicked();
|
||||
|
||||
id: root;
|
||||
width: implicitSize*3;
|
||||
height: implicitSize*1.25;
|
||||
|
||||
Rectangle {
|
||||
id: iconBackground;
|
||||
color: iconButton.containsMouse
|
||||
? ShellGlobals.colors.innerHighlight
|
||||
: ShellGlobals.colors.midlight;
|
||||
border.color: iconButton.containsMouse
|
||||
? ShellGlobals.colors.highlight
|
||||
: ShellGlobals.colors.light;
|
||||
radius: root.radius;
|
||||
anchors.fill: parent;
|
||||
|
||||
RowLayout {
|
||||
spacing: 5;
|
||||
|
||||
anchors {
|
||||
fill: parent;
|
||||
margins: root.padding;
|
||||
}
|
||||
|
||||
IconImage {
|
||||
id: iconImage;
|
||||
implicitSize: root.implicitSize;
|
||||
source: root.source;
|
||||
}
|
||||
|
||||
ColumnLayout {
|
||||
id: textLayout;
|
||||
spacing: 3;
|
||||
Layout.fillWidth: true;
|
||||
|
||||
Text {
|
||||
text: root.text;
|
||||
color: ShellGlobals.colors.text;
|
||||
font.pointSize: 11;
|
||||
font.bold: true;
|
||||
visible: text.length > 0;
|
||||
}
|
||||
|
||||
Text {
|
||||
text: root.subText;
|
||||
color: ShellGlobals.colors.text;
|
||||
font.pointSize: 10;
|
||||
visible: text.length > 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
MouseArea {
|
||||
id: iconButton;
|
||||
hoverEnabled: true;
|
||||
anchors.fill: parent;
|
||||
onPressed: root.clicked();
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue