mirror of
https://github.com/end-4/dots-hyprland.git
synced 2026-06-05 14:59:27 -05:00
material symbols: support filling
This commit is contained in:
@@ -75,8 +75,8 @@ Scope {
|
||||
height: 19.5
|
||||
source: ConfigOptions.bar.topLeftIcon == 'distro' ?
|
||||
SystemInfo.distroIcon : "spark-symbolic"
|
||||
|
||||
}
|
||||
|
||||
ColorOverlay {
|
||||
anchors.fill: distroIcon
|
||||
source: distroIcon
|
||||
@@ -173,12 +173,12 @@ Scope {
|
||||
Network.networkStrength > 20 ? "network_wifi_1_bar" :
|
||||
"signal_wifi_0_bar"
|
||||
) : "signal_wifi_off"
|
||||
font.pixelSize: Appearance.font.pixelSize.larger
|
||||
iconSize: Appearance.font.pixelSize.larger
|
||||
color: Appearance.colors.colOnLayer0
|
||||
}
|
||||
MaterialSymbol {
|
||||
text: Bluetooth.bluetoothConnected ? "bluetooth_connected" : Bluetooth.bluetoothEnabled ? "bluetooth" : "bluetooth_disabled"
|
||||
font.pixelSize: Appearance.font.pixelSize.larger
|
||||
iconSize: Appearance.font.pixelSize.larger
|
||||
color: Appearance.colors.colOnLayer0
|
||||
}
|
||||
}
|
||||
|
||||
@@ -56,7 +56,7 @@ Rectangle {
|
||||
MaterialSymbol {
|
||||
anchors.centerIn: parent
|
||||
text: "battery_full"
|
||||
font.pixelSize: Appearance.font.pixelSize.normal
|
||||
iconSize: Appearance.font.pixelSize.normal
|
||||
color: (isLow && !isCharging) ? batteryLowOnBackground : Appearance.m3colors.m3onSecondaryContainer
|
||||
}
|
||||
|
||||
@@ -70,7 +70,7 @@ Rectangle {
|
||||
anchors.left: rowLayout.left
|
||||
anchors.verticalCenter: rowLayout.verticalCenter
|
||||
text: "bolt"
|
||||
font.pixelSize: Appearance.font.pixelSize.large
|
||||
iconSize: Appearance.font.pixelSize.large
|
||||
color: Appearance.m3colors.m3onSecondaryContainer
|
||||
visible: opacity > 0 // Only show when charging
|
||||
opacity: isCharging ? 1 : 0 // Keep opacity for visibility
|
||||
|
||||
@@ -63,7 +63,7 @@ Item {
|
||||
MaterialSymbol {
|
||||
anchors.centerIn: parent
|
||||
text: activePlayer?.isPlaying ? "pause" : "play_arrow"
|
||||
font.pixelSize: Appearance.font.pixelSize.normal
|
||||
iconSize: Appearance.font.pixelSize.normal
|
||||
color: Appearance.m3colors.m3onSecondaryContainer
|
||||
}
|
||||
|
||||
|
||||
@@ -29,7 +29,7 @@ Item {
|
||||
MaterialSymbol {
|
||||
anchors.centerIn: parent
|
||||
text: iconName
|
||||
font.pixelSize: Appearance.font.pixelSize.normal
|
||||
iconSize: Appearance.font.pixelSize.normal
|
||||
color: Appearance.m3colors.m3onSecondaryContainer
|
||||
}
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@ Rectangle {
|
||||
MaterialSymbol {
|
||||
anchors.centerIn: parent
|
||||
text: "screenshot_region"
|
||||
font.pixelSize: Appearance.font.pixelSize.normal
|
||||
iconSize: Appearance.font.pixelSize.normal
|
||||
color: Appearance.colors.colOnLayer2
|
||||
}
|
||||
|
||||
@@ -39,7 +39,7 @@ Rectangle {
|
||||
MaterialSymbol {
|
||||
anchors.centerIn: parent
|
||||
text: "colorize"
|
||||
font.pixelSize: Appearance.font.pixelSize.normal
|
||||
iconSize: Appearance.font.pixelSize.normal
|
||||
color: Appearance.colors.colOnLayer2
|
||||
}
|
||||
|
||||
|
||||
@@ -19,5 +19,6 @@ Item {
|
||||
}
|
||||
return root.source
|
||||
}
|
||||
implicitSize: root.height
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,9 +3,27 @@ import QtQuick
|
||||
import QtQuick.Layouts
|
||||
|
||||
Text {
|
||||
id: root
|
||||
property real iconSize: Appearance.font.pixelSize.small
|
||||
property real fill: 0
|
||||
renderType: Text.NativeRendering
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
font.family: Appearance.font.family.iconMaterial
|
||||
font.pixelSize: Appearance.font.pixelSize.small
|
||||
font.pixelSize: iconSize
|
||||
color: Appearance.m3colors.m3onBackground
|
||||
|
||||
Behavior on fill {
|
||||
NumberAnimation {
|
||||
duration: Appearance.animation.elementMoveFast.duration
|
||||
easing.type: Appearance.animation.elementMoveFast.type
|
||||
easing.bezierCurve: Appearance.animation.elementMoveFast.bezierCurve
|
||||
}
|
||||
}
|
||||
|
||||
font.variableAxes: {
|
||||
"FILL": fill,
|
||||
// "wght": font.weight,
|
||||
// "GRAD": 0,
|
||||
"opsz": iconSize,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -25,7 +25,7 @@ Button {
|
||||
spacing: 5
|
||||
Rectangle {
|
||||
width: 62
|
||||
implicitHeight: navRailButtonIcon.height + 2*2
|
||||
implicitHeight: navRailButtonIcon.height + 2 * 2
|
||||
Layout.alignment: Qt.AlignHCenter
|
||||
radius: Appearance.rounding.full
|
||||
color: toggled ?
|
||||
@@ -42,7 +42,8 @@ Button {
|
||||
MaterialSymbol {
|
||||
id: navRailButtonIcon
|
||||
anchors.centerIn: parent
|
||||
font.pixelSize: Appearance.font.pixelSize.hugeass
|
||||
iconSize: Appearance.font.pixelSize.hugeass
|
||||
fill: toggled ? 1 : 0
|
||||
text: buttonIcon
|
||||
color: toggled ? Appearance.m3colors.m3onSecondaryContainer : Appearance.colors.colOnLayer1
|
||||
|
||||
|
||||
@@ -280,7 +280,7 @@ Item {
|
||||
color: (notificationObject.urgency == NotificationUrgency.Critical) ?
|
||||
Appearance.mix(Appearance.m3colors.m3onSecondary, Appearance.m3colors.m3onSecondaryContainer, 0.1) :
|
||||
Appearance.m3colors.m3onSecondaryContainer
|
||||
font.pixelSize: 27
|
||||
iconSize: 27
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
}
|
||||
@@ -419,7 +419,7 @@ Item {
|
||||
text: "keyboard_arrow_down"
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
font.pixelSize: Appearance.font.pixelSize.normal
|
||||
iconSize: Appearance.font.pixelSize.normal
|
||||
color: Appearance.colors.colOnLayer2
|
||||
rotation: expanded ? 180 : 0
|
||||
Behavior on rotation {
|
||||
@@ -554,7 +554,7 @@ Item {
|
||||
|
||||
contentItem: MaterialSymbol {
|
||||
id: copyIcon
|
||||
font.pixelSize: Appearance.font.pixelSize.large
|
||||
iconSize: Appearance.font.pixelSize.large
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
color: (notificationObject.urgency == NotificationUrgency.Critical) ?
|
||||
Appearance.m3colors.m3onSurfaceVariant : Appearance.m3colors.m3onSurface
|
||||
@@ -574,7 +574,7 @@ Item {
|
||||
}
|
||||
|
||||
contentItem: MaterialSymbol {
|
||||
font.pixelSize: Appearance.font.pixelSize.large
|
||||
iconSize: Appearance.font.pixelSize.large
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
color: (notificationObject.urgency == NotificationUrgency.Critical) ?
|
||||
Appearance.m3colors.m3onSurfaceVariant : Appearance.m3colors.m3onSurface
|
||||
|
||||
@@ -40,7 +40,8 @@ TabButton {
|
||||
Layout.alignment: Qt.AlignHCenter
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
text: buttonIcon
|
||||
font.pixelSize: 24
|
||||
iconSize: Appearance.font.pixelSize.hugeass
|
||||
fill: selected ? 1 : 0
|
||||
color: selected ? Appearance.m3colors.m3primary : Appearance.colors.colOnLayer1
|
||||
Behavior on color {
|
||||
ColorAnimation {
|
||||
|
||||
@@ -40,7 +40,8 @@ TabButton {
|
||||
Layout.rightMargin: 5
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
text: buttonIcon
|
||||
font.pixelSize: Appearance.font.pixelSize.huge
|
||||
iconSize: Appearance.font.pixelSize.huge
|
||||
fill: selected ? 1 : 0
|
||||
color: selected ? Appearance.m3colors.m3primary : Appearance.colors.colOnLayer1
|
||||
Behavior on color {
|
||||
ColorAnimation {
|
||||
|
||||
@@ -40,7 +40,7 @@ Item {
|
||||
Layout.bottomMargin: valueIndicatorVerticalPadding
|
||||
color: Appearance.colors.colOnLayer0
|
||||
text: root.icon
|
||||
font.pixelSize: 30
|
||||
iconSize: 30
|
||||
}
|
||||
ColumnLayout { // Stuff
|
||||
Layout.alignment: Qt.AlignVCenter
|
||||
|
||||
@@ -77,10 +77,9 @@ Button {
|
||||
MaterialSymbol {
|
||||
visible: root.materialSymbol != ""
|
||||
text: root.materialSymbol
|
||||
font.pixelSize: 30
|
||||
iconSize: 30
|
||||
fill: (root.hovered || root.focus) ? 1 : 0
|
||||
color: Appearance.m3colors.m3onSurface
|
||||
// width: 35
|
||||
// height: 35
|
||||
}
|
||||
|
||||
// Main text
|
||||
|
||||
@@ -90,13 +90,12 @@ Item { // Wrapper
|
||||
id: webSearch
|
||||
property list<string> baseCommand: ["xdg-open"]
|
||||
function search(query) {
|
||||
webSearch.running = false
|
||||
let url = ConfigOptions.search.engineBaseUrl + query
|
||||
for (let site of ConfigOptions.search.excludedSites) {
|
||||
url += ` -site:${site}`;
|
||||
}
|
||||
webSearch.command = baseCommand.concat(url)
|
||||
webSearch.running = true
|
||||
webSearch.startDetached()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -104,11 +103,10 @@ Item { // Wrapper
|
||||
id: executor
|
||||
property list<string> baseCommand: ["bash", "-c"]
|
||||
function executeCommand(command) {
|
||||
executor.running = false
|
||||
executor.command = baseCommand.concat(
|
||||
`${command} || ${ConfigOptions.apps.terminal} fish -C 'echo "${qsTr("Searching for package with that command")}..." && pacman -F ${command}'`
|
||||
)
|
||||
executor.running = true
|
||||
executor.startDetached()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -197,7 +195,7 @@ Item { // Wrapper
|
||||
MaterialSymbol {
|
||||
id: searchIcon
|
||||
Layout.leftMargin: 15
|
||||
font.pixelSize: Appearance.font.pixelSize.huge
|
||||
iconSize: Appearance.font.pixelSize.huge
|
||||
color: Appearance.m3colors.m3onSurface
|
||||
text: "search"
|
||||
}
|
||||
|
||||
@@ -52,8 +52,8 @@ Button {
|
||||
anchors.fill: parent
|
||||
color: Appearance.colors.colOnLayer2
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
iconSize: 40
|
||||
text: buttonIcon
|
||||
font.pixelSize: 40
|
||||
}
|
||||
|
||||
StyledToolTip {
|
||||
|
||||
@@ -42,13 +42,6 @@ Item {
|
||||
}
|
||||
|
||||
property var allCommands: [
|
||||
{
|
||||
name: "clear",
|
||||
description: qsTr("Clear the current list of images"),
|
||||
execute: () => {
|
||||
Booru.clearResponses();
|
||||
}
|
||||
},
|
||||
{
|
||||
name: "mode",
|
||||
description: qsTr("Set the current API provider"),
|
||||
@@ -56,6 +49,13 @@ Item {
|
||||
Booru.setProvider(args[0]);
|
||||
}
|
||||
},
|
||||
{
|
||||
name: "clear",
|
||||
description: qsTr("Clear the current list of images"),
|
||||
execute: () => {
|
||||
Booru.clearResponses();
|
||||
}
|
||||
},
|
||||
{
|
||||
name: "next",
|
||||
description: qsTr("Get the next page of results"),
|
||||
@@ -212,7 +212,7 @@ Item {
|
||||
|
||||
MaterialSymbol {
|
||||
Layout.alignment: Qt.AlignHCenter
|
||||
font.pixelSize: 55
|
||||
iconSize: 55
|
||||
color: Appearance.m3colors.m3outline
|
||||
text: "bookmark_heart"
|
||||
}
|
||||
@@ -538,9 +538,10 @@ Item {
|
||||
|
||||
contentItem: MaterialSymbol {
|
||||
anchors.centerIn: parent
|
||||
text: "send"
|
||||
text: "arrow_upward"
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
font.pixelSize: Appearance.font.pixelSize.larger
|
||||
iconSize: Appearance.font.pixelSize.larger
|
||||
fill: sendButton.enabled ? 1 : 0
|
||||
color: sendButton.enabled ? Appearance.m3colors.m3onPrimary : Appearance.colors.colOnLayer2Disabled
|
||||
}
|
||||
}
|
||||
@@ -577,7 +578,7 @@ Item {
|
||||
|
||||
MaterialSymbol {
|
||||
text: "api"
|
||||
font.pixelSize: Appearance.font.pixelSize.large
|
||||
iconSize: Appearance.font.pixelSize.large
|
||||
}
|
||||
StyledText {
|
||||
id: providerName
|
||||
|
||||
@@ -110,7 +110,7 @@ Button {
|
||||
|
||||
contentItem: MaterialSymbol {
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
font.pixelSize: Appearance.font.pixelSize.large
|
||||
iconSize: Appearance.font.pixelSize.large
|
||||
color: Appearance.m3colors.m3onSurface
|
||||
text: "more_vert"
|
||||
}
|
||||
|
||||
@@ -251,7 +251,7 @@ Rectangle {
|
||||
}
|
||||
MaterialSymbol {
|
||||
Layout.alignment: Text.AlignVCenter
|
||||
font.pixelSize: Appearance.font.pixelSize.larger
|
||||
iconSize: Appearance.font.pixelSize.larger
|
||||
color: Appearance.m3colors.m3onSurface
|
||||
text: "chevron_right"
|
||||
}
|
||||
|
||||
@@ -86,7 +86,7 @@ Rectangle {
|
||||
}
|
||||
contentItem: MaterialSymbol {
|
||||
text: "keyboard_arrow_up"
|
||||
font.pixelSize: Appearance.font.pixelSize.larger
|
||||
iconSize: Appearance.font.pixelSize.larger
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
color: Appearance.colors.colOnLayer1
|
||||
}
|
||||
@@ -155,7 +155,7 @@ Rectangle {
|
||||
}
|
||||
contentItem: MaterialSymbol {
|
||||
text: "keyboard_arrow_down"
|
||||
font.pixelSize: Appearance.font.pixelSize.larger
|
||||
iconSize: Appearance.font.pixelSize.larger
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
color: Appearance.colors.colOnLayer1
|
||||
}
|
||||
|
||||
@@ -64,7 +64,7 @@ Item {
|
||||
}
|
||||
contentItem: MaterialSymbol {
|
||||
text: "chevron_left"
|
||||
font.pixelSize: Appearance.font.pixelSize.larger
|
||||
iconSize: Appearance.font.pixelSize.larger
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
color: Appearance.colors.colOnLayer1
|
||||
}
|
||||
@@ -76,7 +76,7 @@ Item {
|
||||
}
|
||||
contentItem: MaterialSymbol {
|
||||
text: "chevron_right"
|
||||
font.pixelSize: Appearance.font.pixelSize.larger
|
||||
iconSize: Appearance.font.pixelSize.larger
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
color: Appearance.colors.colOnLayer1
|
||||
}
|
||||
|
||||
@@ -112,7 +112,7 @@ Item {
|
||||
|
||||
MaterialSymbol {
|
||||
Layout.alignment: Qt.AlignHCenter
|
||||
font.pixelSize: 55
|
||||
iconSize: 55
|
||||
color: Appearance.m3colors.m3outline
|
||||
text: "notifications_active"
|
||||
}
|
||||
|
||||
@@ -42,7 +42,7 @@ Button {
|
||||
MaterialSymbol {
|
||||
text: buttonIcon
|
||||
Layout.fillWidth: false
|
||||
font.pixelSize: Appearance.font.pixelSize.larger
|
||||
iconSize: Appearance.font.pixelSize.larger
|
||||
color: Appearance.colors.colOnLayer1
|
||||
}
|
||||
StyledText {
|
||||
|
||||
@@ -12,10 +12,10 @@ QuickToggleButton {
|
||||
onClicked: {
|
||||
nightLightButton.enabled = !nightLightButton.enabled
|
||||
if (enabled) {
|
||||
nightLightOn.running = true
|
||||
nightLightOn.startDetached()
|
||||
}
|
||||
else {
|
||||
nightLightOff.running = true
|
||||
nightLightOff.startDetached()
|
||||
}
|
||||
}
|
||||
Process {
|
||||
|
||||
@@ -33,7 +33,8 @@ Button {
|
||||
|
||||
MaterialSymbol {
|
||||
anchors.centerIn: parent
|
||||
font.pixelSize: Appearance.font.pixelSize.larger
|
||||
iconSize: Appearance.font.pixelSize.larger
|
||||
fill: toggled ? 1 : 0
|
||||
text: buttonIcon
|
||||
color: toggled ? Appearance.m3colors.m3onPrimary : Appearance.colors.colOnLayer1
|
||||
|
||||
|
||||
@@ -118,7 +118,7 @@ Item {
|
||||
anchors.centerIn: parent
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
text: modelData.done ? "remove_done" : "check"
|
||||
font.pixelSize: Appearance.font.pixelSize.larger
|
||||
iconSize: Appearance.font.pixelSize.larger
|
||||
color: Appearance.colors.colOnLayer1
|
||||
}
|
||||
}
|
||||
@@ -132,7 +132,7 @@ Item {
|
||||
anchors.centerIn: parent
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
text: "delete_forever"
|
||||
font.pixelSize: Appearance.font.pixelSize.larger
|
||||
iconSize: Appearance.font.pixelSize.larger
|
||||
color: Appearance.colors.colOnLayer1
|
||||
}
|
||||
}
|
||||
@@ -168,7 +168,7 @@ Item {
|
||||
|
||||
MaterialSymbol {
|
||||
Layout.alignment: Qt.AlignHCenter
|
||||
font.pixelSize: 55
|
||||
iconSize: 55
|
||||
color: Appearance.m3colors.m3outline
|
||||
text: emptyPlaceholderIcon
|
||||
}
|
||||
|
||||
@@ -204,7 +204,7 @@ Item {
|
||||
contentItem: MaterialSymbol {
|
||||
text: "add"
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
font.pixelSize: Appearance.font.pixelSize.huge
|
||||
iconSize: Appearance.font.pixelSize.huge
|
||||
color: Appearance.m3colors.m3onPrimaryContainer
|
||||
}
|
||||
}
|
||||
|
||||
@@ -39,7 +39,7 @@ Button {
|
||||
Layout.fillWidth: false
|
||||
Layout.leftMargin: 5
|
||||
color: Appearance.colors.colOnLayer2
|
||||
font.pixelSize: Appearance.font.pixelSize.hugeass
|
||||
iconSize: Appearance.font.pixelSize.hugeass
|
||||
text: input ? "mic_external_on" : "media_output"
|
||||
}
|
||||
|
||||
|
||||
@@ -98,7 +98,7 @@ Item {
|
||||
|
||||
MaterialSymbol {
|
||||
Layout.alignment: Qt.AlignHCenter
|
||||
font.pixelSize: 55
|
||||
iconSize: 55
|
||||
color: Appearance.m3colors.m3outline
|
||||
text: "brand_awareness"
|
||||
}
|
||||
|
||||
@@ -20,14 +20,14 @@ Singleton {
|
||||
"ollama-llama-3.2": {
|
||||
"name": "Ollama - Llama 3.2",
|
||||
"icon": "ollama-symbolic",
|
||||
"description": "Ollama - Llama 3.2",
|
||||
"description": "Local Ollama model - Llama 3.2",
|
||||
"endpoint": "http://localhost:11434/api/chat",
|
||||
"model": "llama3.2",
|
||||
},
|
||||
"gemini-2.0-flash": {
|
||||
"name": "Gemini 2.0 Flash",
|
||||
"icon": "gemini-symbolic",
|
||||
"description": "Gemini 2.0 Flash",
|
||||
"description": "Online Gemini 2.0 Flash",
|
||||
"endpoint": "https://generativelanguage.googleapis.com/v1beta/models/gemini-2.0-flash:streamGenerateContent",
|
||||
"model": "gemini-2.0-flash",
|
||||
"messageMapFunc": function (message) {
|
||||
|
||||
@@ -9,12 +9,14 @@ Singleton {
|
||||
property string distroName: "Unknown"
|
||||
property string distroId: "unknown"
|
||||
property string distroIcon: "linux-symbolic"
|
||||
property string username: "user"
|
||||
|
||||
Timer {
|
||||
interval: 1
|
||||
running: true
|
||||
repeat: false
|
||||
onTriggered: {
|
||||
getUsername.running = true
|
||||
fileOsRelease.reload()
|
||||
const textOsRelease = fileOsRelease.text()
|
||||
|
||||
@@ -46,6 +48,16 @@ Singleton {
|
||||
}
|
||||
}
|
||||
|
||||
Process {
|
||||
id: getUsername
|
||||
command: ["whoami"]
|
||||
stdout: SplitParser {
|
||||
onRead: data => {
|
||||
username = data.trim()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
FileView {
|
||||
id: fileOsRelease
|
||||
path: "/etc/os-release"
|
||||
|
||||
Reference in New Issue
Block a user