1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2026-01-24 21:42:51 -05:00

font tweaks

This commit is contained in:
bbedward
2025-07-28 11:38:49 -04:00
parent 03b8370c14
commit 73e1f0b6c0
6 changed files with 18 additions and 24 deletions

View File

@@ -130,7 +130,7 @@ DankModal {
Row {
anchors.centerIn: parent
spacing: Theme.spacingS
spacing: Theme.spacingXS
DankIcon {
name: {
@@ -148,6 +148,7 @@ DankModal {
size: Theme.iconSize - 2
color: currentTab === index ? Theme.primary : Theme.surfaceText
opacity: currentTab === index ? 1 : 0.7
anchors.verticalCenter: parent.verticalCenter
Behavior on color {
ColorAnimation {
@@ -161,8 +162,10 @@ DankModal {
StyledText {
text: modelData
font.pixelSize: Theme.fontSizeLarge
font.weight: currentTab === index ? Font.Bold : Font.Medium
font.weight: Font.Medium
color: currentTab === index ? Theme.primary : Theme.surfaceText
anchors.verticalCenter: parent.verticalCenter
anchors.verticalCenterOffset: -1
Behavior on color {
ColorAnimation {

View File

@@ -104,18 +104,15 @@ ScrollView {
if (Prefs.fontFamily === Prefs.defaultFontFamily) {
return "Default";
}
return Prefs.fontFamily || "System Default";
return Prefs.fontFamily || "Default";
}
enableFuzzySearch: true
popupWidthOffset: 100
maxPopupHeight: 400
options: {
var fonts = ["System Default"];
var fonts = ["Default"];
var availableFonts = Qt.fontFamilies();
// Add default font at the top
fonts.push("Default");
var rootFamilies = [];
var seenFamilies = new Set();
@@ -151,9 +148,7 @@ ScrollView {
return fonts.concat(rootFamilies.sort());
}
onValueChanged: (value) => {
if (value === "System Default") {
Prefs.setFontFamily(Prefs.defaultFontFamily);
} else if (value === "Default") {
if (value === "Default") {
Prefs.setFontFamily(Prefs.defaultFontFamily);
} else {
Prefs.setFontFamily(value);
@@ -206,18 +201,15 @@ ScrollView {
if (Prefs.monoFontFamily === Prefs.defaultMonoFontFamily) {
return "Default";
}
return Prefs.monoFontFamily || "System Default";
return Prefs.monoFontFamily || "Default";
}
enableFuzzySearch: true
popupWidthOffset: 100
maxPopupHeight: 400
options: {
var fonts = ["System Default"];
var fonts = ["Default"];
var availableFonts = Qt.fontFamilies();
// Add default mono font at the top
fonts.push("Default");
var monoFamilies = [];
var seenFamilies = new Set();
@@ -265,9 +257,7 @@ ScrollView {
return fonts.concat(monoFamilies.sort());
}
onValueChanged: (value) => {
if (value === "System Default") {
Prefs.setMonoFontFamily(Prefs.defaultMonoFontFamily);
} else if (value === "Default") {
if (value === "Default") {
Prefs.setMonoFontFamily(Prefs.defaultMonoFontFamily);
} else {
Prefs.setMonoFontFamily(value);

View File

@@ -31,7 +31,7 @@ Rectangle {
StyledText {
text: Prefs.use24HourClock ? Qt.formatTime(root.currentDate, "H:mm") : Qt.formatTime(root.currentDate, "h:mm AP")
font.pixelSize: Theme.fontSizeMedium
font.pixelSize: Theme.fontSizeMedium - 1
color: Theme.surfaceText
anchors.verticalCenter: parent.verticalCenter
}
@@ -46,7 +46,7 @@ Rectangle {
StyledText {
text: Qt.formatDate(root.currentDate, "ddd d")
font.pixelSize: Theme.fontSizeMedium
font.pixelSize: Theme.fontSizeMedium - 1
color: Theme.surfaceText
anchors.verticalCenter: parent.verticalCenter
visible: !compactMode

View File

@@ -36,7 +36,7 @@ Rectangle {
id: appText
text: FocusedWindowService.focusedAppName || ""
font.pixelSize: Theme.fontSizeMedium
font.pixelSize: Theme.fontSizeSmall
font.weight: Font.Medium
color: Theme.surfaceText
anchors.verticalCenter: parent.verticalCenter
@@ -47,7 +47,7 @@ Rectangle {
StyledText {
text: "•"
font.pixelSize: Theme.fontSizeMedium
font.pixelSize: Theme.fontSizeSmall
color: Theme.outlineButton
anchors.verticalCenter: parent.verticalCenter
visible: appText.text && titleText.text
@@ -57,7 +57,7 @@ Rectangle {
id: titleText
text: FocusedWindowService.focusedWindowTitle || ""
font.pixelSize: Theme.fontSizeMedium
font.pixelSize: Theme.fontSizeSmall
font.weight: Font.Medium
color: Theme.surfaceText
anchors.verticalCenter: parent.verticalCenter

View File

@@ -251,4 +251,4 @@ Rectangle {
}
}
}

View File

@@ -56,6 +56,7 @@ Item {
color: parent.parent.isActive ? Theme.primary : Theme.surfaceText
font.weight: parent.parent.isActive ? Font.Medium : Font.Normal
anchors.verticalCenter: parent.verticalCenter
anchors.verticalCenterOffset: 1
visible: parent.parent.hasText
}