mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-01-29 07:52:50 -05:00
font tweaks
This commit is contained in:
@@ -130,7 +130,7 @@ DankModal {
|
|||||||
|
|
||||||
Row {
|
Row {
|
||||||
anchors.centerIn: parent
|
anchors.centerIn: parent
|
||||||
spacing: Theme.spacingS
|
spacing: Theme.spacingXS
|
||||||
|
|
||||||
DankIcon {
|
DankIcon {
|
||||||
name: {
|
name: {
|
||||||
@@ -148,6 +148,7 @@ DankModal {
|
|||||||
size: Theme.iconSize - 2
|
size: Theme.iconSize - 2
|
||||||
color: currentTab === index ? Theme.primary : Theme.surfaceText
|
color: currentTab === index ? Theme.primary : Theme.surfaceText
|
||||||
opacity: currentTab === index ? 1 : 0.7
|
opacity: currentTab === index ? 1 : 0.7
|
||||||
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
|
|
||||||
Behavior on color {
|
Behavior on color {
|
||||||
ColorAnimation {
|
ColorAnimation {
|
||||||
@@ -161,8 +162,10 @@ DankModal {
|
|||||||
StyledText {
|
StyledText {
|
||||||
text: modelData
|
text: modelData
|
||||||
font.pixelSize: Theme.fontSizeLarge
|
font.pixelSize: Theme.fontSizeLarge
|
||||||
font.weight: currentTab === index ? Font.Bold : Font.Medium
|
font.weight: Font.Medium
|
||||||
color: currentTab === index ? Theme.primary : Theme.surfaceText
|
color: currentTab === index ? Theme.primary : Theme.surfaceText
|
||||||
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
|
anchors.verticalCenterOffset: -1
|
||||||
|
|
||||||
Behavior on color {
|
Behavior on color {
|
||||||
ColorAnimation {
|
ColorAnimation {
|
||||||
|
|||||||
@@ -104,18 +104,15 @@ ScrollView {
|
|||||||
if (Prefs.fontFamily === Prefs.defaultFontFamily) {
|
if (Prefs.fontFamily === Prefs.defaultFontFamily) {
|
||||||
return "Default";
|
return "Default";
|
||||||
}
|
}
|
||||||
return Prefs.fontFamily || "System Default";
|
return Prefs.fontFamily || "Default";
|
||||||
}
|
}
|
||||||
enableFuzzySearch: true
|
enableFuzzySearch: true
|
||||||
popupWidthOffset: 100
|
popupWidthOffset: 100
|
||||||
maxPopupHeight: 400
|
maxPopupHeight: 400
|
||||||
options: {
|
options: {
|
||||||
var fonts = ["System Default"];
|
var fonts = ["Default"];
|
||||||
var availableFonts = Qt.fontFamilies();
|
var availableFonts = Qt.fontFamilies();
|
||||||
|
|
||||||
// Add default font at the top
|
|
||||||
fonts.push("Default");
|
|
||||||
|
|
||||||
var rootFamilies = [];
|
var rootFamilies = [];
|
||||||
var seenFamilies = new Set();
|
var seenFamilies = new Set();
|
||||||
|
|
||||||
@@ -151,9 +148,7 @@ ScrollView {
|
|||||||
return fonts.concat(rootFamilies.sort());
|
return fonts.concat(rootFamilies.sort());
|
||||||
}
|
}
|
||||||
onValueChanged: (value) => {
|
onValueChanged: (value) => {
|
||||||
if (value === "System Default") {
|
if (value === "Default") {
|
||||||
Prefs.setFontFamily(Prefs.defaultFontFamily);
|
|
||||||
} else if (value === "Default") {
|
|
||||||
Prefs.setFontFamily(Prefs.defaultFontFamily);
|
Prefs.setFontFamily(Prefs.defaultFontFamily);
|
||||||
} else {
|
} else {
|
||||||
Prefs.setFontFamily(value);
|
Prefs.setFontFamily(value);
|
||||||
@@ -206,18 +201,15 @@ ScrollView {
|
|||||||
if (Prefs.monoFontFamily === Prefs.defaultMonoFontFamily) {
|
if (Prefs.monoFontFamily === Prefs.defaultMonoFontFamily) {
|
||||||
return "Default";
|
return "Default";
|
||||||
}
|
}
|
||||||
return Prefs.monoFontFamily || "System Default";
|
return Prefs.monoFontFamily || "Default";
|
||||||
}
|
}
|
||||||
enableFuzzySearch: true
|
enableFuzzySearch: true
|
||||||
popupWidthOffset: 100
|
popupWidthOffset: 100
|
||||||
maxPopupHeight: 400
|
maxPopupHeight: 400
|
||||||
options: {
|
options: {
|
||||||
var fonts = ["System Default"];
|
var fonts = ["Default"];
|
||||||
var availableFonts = Qt.fontFamilies();
|
var availableFonts = Qt.fontFamilies();
|
||||||
|
|
||||||
// Add default mono font at the top
|
|
||||||
fonts.push("Default");
|
|
||||||
|
|
||||||
var monoFamilies = [];
|
var monoFamilies = [];
|
||||||
var seenFamilies = new Set();
|
var seenFamilies = new Set();
|
||||||
|
|
||||||
@@ -265,9 +257,7 @@ ScrollView {
|
|||||||
return fonts.concat(monoFamilies.sort());
|
return fonts.concat(monoFamilies.sort());
|
||||||
}
|
}
|
||||||
onValueChanged: (value) => {
|
onValueChanged: (value) => {
|
||||||
if (value === "System Default") {
|
if (value === "Default") {
|
||||||
Prefs.setMonoFontFamily(Prefs.defaultMonoFontFamily);
|
|
||||||
} else if (value === "Default") {
|
|
||||||
Prefs.setMonoFontFamily(Prefs.defaultMonoFontFamily);
|
Prefs.setMonoFontFamily(Prefs.defaultMonoFontFamily);
|
||||||
} else {
|
} else {
|
||||||
Prefs.setMonoFontFamily(value);
|
Prefs.setMonoFontFamily(value);
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ Rectangle {
|
|||||||
|
|
||||||
StyledText {
|
StyledText {
|
||||||
text: Prefs.use24HourClock ? Qt.formatTime(root.currentDate, "H:mm") : Qt.formatTime(root.currentDate, "h:mm AP")
|
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
|
color: Theme.surfaceText
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
}
|
}
|
||||||
@@ -46,7 +46,7 @@ Rectangle {
|
|||||||
|
|
||||||
StyledText {
|
StyledText {
|
||||||
text: Qt.formatDate(root.currentDate, "ddd d")
|
text: Qt.formatDate(root.currentDate, "ddd d")
|
||||||
font.pixelSize: Theme.fontSizeMedium
|
font.pixelSize: Theme.fontSizeMedium - 1
|
||||||
color: Theme.surfaceText
|
color: Theme.surfaceText
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
visible: !compactMode
|
visible: !compactMode
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ Rectangle {
|
|||||||
id: appText
|
id: appText
|
||||||
|
|
||||||
text: FocusedWindowService.focusedAppName || ""
|
text: FocusedWindowService.focusedAppName || ""
|
||||||
font.pixelSize: Theme.fontSizeMedium
|
font.pixelSize: Theme.fontSizeSmall
|
||||||
font.weight: Font.Medium
|
font.weight: Font.Medium
|
||||||
color: Theme.surfaceText
|
color: Theme.surfaceText
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
@@ -47,7 +47,7 @@ Rectangle {
|
|||||||
|
|
||||||
StyledText {
|
StyledText {
|
||||||
text: "•"
|
text: "•"
|
||||||
font.pixelSize: Theme.fontSizeMedium
|
font.pixelSize: Theme.fontSizeSmall
|
||||||
color: Theme.outlineButton
|
color: Theme.outlineButton
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
visible: appText.text && titleText.text
|
visible: appText.text && titleText.text
|
||||||
@@ -57,7 +57,7 @@ Rectangle {
|
|||||||
id: titleText
|
id: titleText
|
||||||
|
|
||||||
text: FocusedWindowService.focusedWindowTitle || ""
|
text: FocusedWindowService.focusedWindowTitle || ""
|
||||||
font.pixelSize: Theme.fontSizeMedium
|
font.pixelSize: Theme.fontSizeSmall
|
||||||
font.weight: Font.Medium
|
font.weight: Font.Medium
|
||||||
color: Theme.surfaceText
|
color: Theme.surfaceText
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
|
|||||||
@@ -251,4 +251,4 @@ Rectangle {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -56,6 +56,7 @@ Item {
|
|||||||
color: parent.parent.isActive ? Theme.primary : Theme.surfaceText
|
color: parent.parent.isActive ? Theme.primary : Theme.surfaceText
|
||||||
font.weight: parent.parent.isActive ? Font.Medium : Font.Normal
|
font.weight: parent.parent.isActive ? Font.Medium : Font.Normal
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
|
anchors.verticalCenterOffset: 1
|
||||||
visible: parent.parent.hasText
|
visible: parent.parent.hasText
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user