1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2026-08-02 11:38:30 -04:00
Files
DankMaterialShell/quickshell/Modules/Settings/Widgets/SettingsFontDropdownRow.qml
T
purian23 597ba597e5 feat(settings): implement greeter & lockscreen customization options
- New option to customize your font & wallpaper on the LockScreen
- New floating sync button if missed to explicitly sync on greeter changes
2026-07-02 17:13:18 -04:00

34 lines
878 B
QML

pragma ComponentBehavior: Bound
import QtQuick
import qs.Common
SettingsDropdownRow {
id: root
property string currentFont: ""
signal fontSelected(string family)
property var _families: ["Default"]
property bool _enumerated: false
function _enumerate() {
if (_enumerated)
return;
var fonts = Qt.fontFamilies().filter(f => !f.startsWith("."));
fonts.sort();
fonts.unshift("Default");
_families = fonts;
_enumerated = true;
}
enableFuzzySearch: true
popupWidthOffset: 100
maxPopupHeight: 400
options: _families
currentValue: (root.currentFont === "" || root.currentFont === Theme.defaultFontFamily) ? "Default" : root.currentFont
onValueChanged: value => root.fontSelected(value === "Default" ? "" : value)
Component.onCompleted: Qt.callLater(_enumerate)
}