ColorSchemesPage

Search for usage in LXR

ColorSchemesPage Class Reference

Properties

color backgroundColor
 
string currentTheme
 

Signals

void colorsPicked (string backgroundColor, string textColor)
 

Detailed Description

A settings page with the available color schemes for the syntax highlighting.

Maui.SettingsDialog
{
id: _settings
Component
{
id: _colorsComponent
TE.ColorSchemesPage
{
backgroundColor: _editor.document.backgroundColor
currentTheme: _editor.document.theme
onCurrentThemeChanged: _editor.document.theme = currentTheme
onColorsPicked: (background, text) =>
{
_editor.Maui.Theme.backgroundColor = background
_editor.body.color = text
}
}
}
Maui.SectionItem
{
text: "Color scheme"
onClicked: _settings.addPage(_colorsComponent)
}
}
TE.TextEditor
{
id: _editor
anchors.fill: parent
body.wrapMode: Text.NoWrap
document.enableSyntaxHighlighting: true
}
color backgroundColor
The current background color used in the text area or the one currently picked by the user.
string currentTheme
The current theme being used or currently picked by the user.

Definition at line 48 of file ColorSchemesPage.qml.

Property Documentation

◆ backgroundColor

color ColorSchemesPage::backgroundColor
read

The current background color used in the text area or the one currently picked by the user.

Definition at line 58 of file ColorSchemesPage.qml.

◆ currentTheme

string ColorSchemesPage::currentTheme
read

The current theme being used or currently picked by the user.

Definition at line 54 of file ColorSchemesPage.qml.

Member Function Documentation

◆ colorsPicked

void ColorSchemesPage::colorsPicked ( string backgroundColor,
string textColor )
signal

Emitted when a new background color has been picked.

Parameters
backgroundColorthe picked background color
textColora suited text color for the background color picked

The documentation for this class was generated from the following file:
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 4 2024 16:31:40 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.