Changeset View
Changeset View
Standalone View
Standalone View
kcms/fonts/package/contents/ui/FontWidget.qml
Show All 40 Lines | 28 | FocusScope { | |||
---|---|---|---|---|---|
41 | implicitHeight: layout.implicitHeight | 41 | implicitHeight: layout.implicitHeight | ||
42 | 42 | | |||
43 | RowLayout { | 43 | RowLayout { | ||
44 | id: layout | 44 | id: layout | ||
45 | 45 | | |||
46 | QtControls.TextField { | 46 | QtControls.TextField { | ||
47 | readOnly: true | 47 | readOnly: true | ||
48 | Kirigami.Theme.inherit: true | 48 | Kirigami.Theme.inherit: true | ||
49 | text: root.font.family + " " + root.font.pointSize | 49 | text: root.font.family + " " + root.font.pointSize + "pt" | ||
50 | font: root.font | 50 | font: root.font | ||
51 | Layout.fillHeight: true | 51 | Layout.fillHeight: true | ||
52 | } | 52 | } | ||
53 | 53 | | |||
54 | QtControls.Button { | 54 | QtControls.Button { | ||
55 | text: i18n("Choose...") | 55 | icon.name: "document-edit" | ||
56 | Layout.fillHeight: true | 56 | Layout.fillHeight: true | ||
57 | Kirigami.MnemonicData.enabled: false | 57 | Kirigami.MnemonicData.enabled: false | ||
58 | focus: true | 58 | focus: true | ||
59 | onClicked: { | 59 | onClicked: { | ||
60 | fontDialog.adjustAllFonts = false; | 60 | fontDialog.adjustAllFonts = false; | ||
61 | fontDialog.currentCategory = root.category | 61 | fontDialog.currentCategory = root.category | ||
62 | fontDialog.font = root.font; | 62 | fontDialog.font = root.font; | ||
63 | fontDialog.currentFont = root.font; | 63 | fontDialog.currentFont = root.font; | ||
64 | fontDialog.open() | 64 | fontDialog.open() | ||
65 | } | 65 | } | ||
66 | QtControls.ToolTip { | ||||
67 | visible: parent.hovered | ||||
68 | text: i18n("Select %1 Font...", label.replace(':', '')) | ||||
69 | font.capitalization: Font.Capitalize | ||||
70 | } | ||||
66 | } | 71 | } | ||
67 | } | 72 | } | ||
68 | } | 73 | } | ||
69 | 74 | |