5import org.mauikit.controls as Maui
6import org.mauikit.texteditor as TE
58 property
string currentTheme
63 property color backgroundColor
70 signal colorsPicked(
string backgroundColor,
string textColor)
75 description: i18n("Configure the style of the syntax highlighting. This configuration in not applied for rich text formats.")
79 label1.text:
i18n(
"Color")
80 label2.text: i18n("Editor background color.")
84 spacing:
Maui.Style.space.medium
85 currentColor: control.backgroundColor
86 colors: [
"#333",
"#fafafa",
"#fff3e6",
"#4c425b"]
96 case "#333": textColor =
"#fafafa";
break;
97 case "#fafafa": textColor =
"#333";
break;
98 case "#fff3e6": textColor =
Qt.darker(color, 2);
break;
99 case "#4c425b": textColor =
Qt.lighter(color, 2.5);
break;
100 default: textColor =
Maui.Theme.textColor;
103 control.colorsPicked(color, textColor)
110 label1.text:
i18n(
"Theme")
111 label2.text: i18n("Editor color scheme style.")
116 Layout.fillWidth:
true
117 opacity: enabled ? 1 : 0.5
121 model: TE.ColorSchemesModel {}
123 delegate:
Maui.GridBrowserDelegate
125 Layout.fillWidth:
true
126 checked: model.name === control.currentTheme
127 onClicked: control.currentTheme = model.name
128 label1.text: model.name
130 template.iconComponent: Rectangle
132 implicitHeight: Math.max(_layout.implicitHeight + topPadding + bottomPadding, 64)
134 color: control.backgroundColor
135 radius:
Maui.Style.radiusV
141 anchors.margins:
Maui.Style.space.small
147 wrapMode:
Text.NoWrap
148 elide:
Text.ElideLeft
151 color: model.foreground
152 font.family:
"Monospace"
160 color: model.highlight
QString i18n(const char *text, const TYPE &arg...)
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 18 2024 12:19:21 by
doxygen 1.12.0 written
by
Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.