This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
Themes
Every color, font and size that an Xtk widget draws with comes from one structure, the XtkConfig. A theme fills in its colors from a short list of role colors, and can set any single key on top. This page explains the config, the theme file and its roles, gradients and bevels, where a program finds its themes, and every section and key of the settings file.
The config and the theme
An XtkConfig (xtk_config.h) holds one block for each kind of widget: config.button for buttons, config.entry_text for text entries, config.treeview for trees, and so on, and blocks with the sizes that go with them (config.button_widget ...). A widget is made with its block, and draws with it. xtk_config_init_defaults() fills the whole config with the toolkit's defaults.
A theme (xtk_theme.h) is what most programs change it with. It has a name, up to 17 role colors ("window", "accent" ...) from which every widget color is worked out, and any number of single keys that set one value of one widget. xtk_theme_apply() writes a theme into a config. A settings file can set any key as well, with xtk_config_load().
Applying a theme first works out every widget color from the roles, then sets the theme's single keys over them. The program decides the order of theme and settings file.
A program that follows the usual order:
static XtkConfig config;
xtk_config_init_defaults(&config); /* 1. the defaults */
xtk_theme_load_named(&config, "myprogram", "Dark"); /* 2. the user's theme, or the built-in one */
xtk_config_load(&config, settings_path); /* 3. the user's own keys, if any */
/* ... make the widgets with &config.button, &config.label ... */
To change the theme of a running program, do the same steps again on the same config, then call xtk_widget_set_theme() for each widget, and set the background of the program's own windows to the new config.main.background.
The role colors
A theme's [colors] section gives the role colors. Every widget color follows one of them, so a whole theme can be as short as two or three lines. A role the theme leaves out is worked out from the others, as the third column says. "Dark" and "light" mean the window color's brightness (below or above the middle).
| Role | What it colors | When the theme leaves it out |
|---|---|---|
window |
Window and panel backgrounds, labels, check boxes, sliders, the content of tabs and tool windows | #2D2D2D |
window-text |
Text on the window color: labels, menus, check boxes, tab content | Near white on a dark window, near black on a light one |
base |
Backgrounds of things that hold data: entries, text views, trees, tables, menus, the list of a combo box | The window color, a little darker (dark) or much lighter (light) |
base-text |
Text on the base color, and the text caret | window-text |
button |
Buttons, combo boxes, tabs, the headers of tool windows, the handle of a slider | The window color with 6% of the window text |
button-text |
Text on buttons, combo boxes and tabs | window-text |
border |
Borders and lines, the thumbs of scroll bars | The window color with 35% of the window text |
accent |
The selection, focus rings, the hover border, the fill of sliders and progress bars, badges | #3584E4 |
accent-text |
Text on the accent color: selected text and rows | White on a dark accent, black on a light one |
hover |
What the pointer is over: a button, a menu item, a tree row | The button color with 10% of the window text |
active |
A pressed button, an open menu title | The button color with 30% of the accent |
muted |
Quiet text and lines: line numbers, branch lines of a tree, graph edges, tool window icons | The window text with 40% of the window color |
link |
Links, and the keys of a settings file shown in a text view | accent |
valid |
The border of an entry whose value is valid | #26A269 |
invalid |
The border of an entry whose value is not valid | #E01B24 |
tooltip |
Tooltip backgrounds | base |
tooltip-text |
Tooltip text | base-text |
Some widget colors are mixtures of two roles (the hover border of an entry is half border and half accent, the status bar is the window color made a little darker). The API page xtk_theme lists the functions, and xtk_theme_resolve_roles() gives all 17 colors as a theme works them out.
The theme file
A theme file is a text file named Name.conf, in sections like the settings file:
; A comment line starts with ; or #.
[theme]
name = Harbor
[colors]
window = #23272E
window-text = #D8DEE9
accent = #5E81AC
[button]
background = linear-gradient(180deg, #3B4252, #2E3440)
highlight = #FFFFFF18
shade = #00000040
[tooltip]
delay-ms = 250
[app]
gutter = #2B303B
; the program reads these lines itself
| Section | What it holds |
|---|---|
[theme] |
name: the theme's name. Without it, the theme is named after its file (without .conf). |
[colors] |
The role colors of the table above, one role = color line each. Unknown names and colors that cannot be read are skipped. |
Any other section, such as [button] |
Single keys of the settings file (see every section and key below), set over the colors that the roles gave. Any key can be set here, also a font, a size or a delay. A theme can hold at most 512 of them. |
[app] |
Lines for the program itself, kept as they are, comments too. Xtk does not read them; the program gets a value with xtk_theme_app_get() and sets one with xtk_theme_app_set(). |
A theme written by xtk_theme_write() starts with a few comment lines, then [theme], then [colors] with only the roles the theme sets, then the single keys by section, and [app] last.
Colors, gradients and bevels
Colors. In [colors], a color can be #RGB, #RGBA, #RRGGBB, #RRGGBBAA, rgb(r, g, b) or rgba(r, g, b, a) (numbers from 0 to 255 or percentages, and the alpha from 0 to 1), or white, black or transparent. The role colors are always opaque. In the other sections, and in the settings file, a color key takes the same forms, and also six or eight hex digits without the #; in #RRGGBBAA the last pair is the alpha (00 fully transparent). A widget that draws no transparency uses the color as it is. A value that is not a color gives black.
Gradients. Any color key of a widget section can instead be a CSS gradient:
linear-gradient(direction,color[position%], ...), where the direction is an angle (180deg, the default, runs from top to bottom;90degfrom left to right; alsoturnandrad) orto bottom,to top rightand so on;radial-gradient(color[position%], ...), from the middle outward (a shape given first is skipped).
A gradient has 1 to 8 color stops, in any of the color forms of [colors]. A stop without a position is placed evenly between its neighbors; the first is at 0% and the last at 100% when they have none. An "in ..." color space (180deg in oklch) is read and not used: the colors blend in RGB.
The config keeps the gradient in a table, and gives the widget's color key the gradient's average color. A widget that draws gradients takes the gradient from the table when it draws; every other widget, and every program that reads the config, sees the average. These keys are drawn as gradients: the background of buttons, check boxes, radio buttons, labels, entries, spin buttons, combo boxes (and their list), menus, the menu bar, tabs, tooltips, sliders (also the track, the fill and the handle), progress bars, scroll bars, split panes, the dock frame, tool windows, trees, tables, the graph, the status bar, text views and rich text views, and most of their hover, active and selected colors.
Bevels. Two more keys, highlight and shade, draw a 3D edge: a light line inside the top edge and a dark line inside the bottom one. Give them colors with alpha, such as #FFFFFF18. Buttons, combo boxes and tabs draw them. (In [textview], highlight is the color of the highlighter pen instead.)
The table of gradients and bevels belongs to the theme: xtk_theme_apply() empties it before it sets the theme's keys, and a widget whose color the program changed by hand (so that it is no longer the gradient's average) draws that color flat.
Where themes are found
Each program has its own theme folder, and can also use themes that are installed on the system for every program, the way GTK themes are:
| Folder | What is in it |
|---|---|
$XDG_CONFIG_HOME/program/themes/, or ~/.config/program/themes/ |
The program's own themes, which the user can change. xtk_theme_directory() gives this path. |
~/.themes/Theme/xtk/ |
Installed themes: each theme folder (the one that also holds gtk-3.0/ and the rest) can hold Xtk themes in its xtk/ folder. They are read only. |
$XDG_DATA_HOME/themes/Theme/xtk/, or ~/.local/share/themes/Theme/xtk/ |
|
/usr/share/themes/Theme/xtk/ |
A theme is every .conf file there, by its file name. xtk_theme_list_all() lists them all, sorted by name; when two have the same name, the program's own folder wins, then the folders in the order above. xtk_theme_find() gives the file of a theme by its name.
The built-in themes. Xtk has 14 themes built in, the same in every program: Chocolate, Dark, Ember, Forest, Gold, Graphite, Light, Midnight, Ocean, Rose, Rust, Slate, Teal and Violet. xtk_theme_builtin() loads one by its name (in any case). xtk_theme_install_builtins() writes each of them into a folder (usually the program's own theme folder) as a file the user can change, creating the folder if needed; a file that is already there is left alone. Each built-in theme gives nine roles (window to accent-text in the table above) and sets every widget color as a single key, so it is also a complete example of a theme file.
Themes in a program
| Call | What it does |
|---|---|
xtk_theme_new(), xtk_theme_free(), xtk_theme_copy() |
Make an empty theme (no roles, no keys), free one, copy one. A theme is large; keep it on the heap. |
xtk_theme_read(), xtk_theme_parse() |
Read a theme from a file, or from text in memory. Reading replaces everything the theme had. |
xtk_theme_write(), xtk_theme_write_file() |
Write a theme to a file, or to an open stream. |
xtk_theme_builtin() |
Load a built-in theme by its name. |
xtk_theme_apply() |
Write a theme into a config: every widget color from the roles, then each of the theme's single keys, as a settings file would set them. |
xtk_theme_apply_colors() |
The same, but only colors: the roles and the theme's color keys (a gradient as its average). Fonts, sizes and the gradient table are left alone. |
xtk_theme_load() |
Read a theme file and apply it, in one call. |
xtk_theme_load_named() |
Find a theme by name in the program's own folder and among the installed themes (as xtk_theme_find() does), or else among the built-in themes, and apply it. It also sets config.main.theme to the name. The focus rings of buttons, check boxes, text views and graphs that an older theme file left at the toolkit's default blue get the focus border of the text entries instead (the accent, unless the theme changes it). |
xtk_theme_capture() |
The reverse: adds to a theme, as single keys, every color of a config that differs from what the theme's roles give. A program's theme editor uses it to save what the user changed. |
xtk_theme_complete() |
Adds every color key that the theme does not set yet, with the value its roles give, so that the file lists every key. |
xtk_theme_set_role(), xtk_theme_resolve_roles(), xtk_theme_role_find() |
Set or unset one role, work out all 17, find a role by its name (xtk_theme_role_names has them all). |
xtk_theme_override_get(), xtk_theme_override_set() |
Read, set or (with NULL) remove one single key of a theme. |
xtk_theme_app_get(), xtk_theme_app_set() |
Read and set a line of the [app] section. |
xtk_theme_directory(), xtk_theme_list(), xtk_theme_list_all(), xtk_theme_find(), xtk_theme_path(), xtk_theme_install_builtins() |
The theme folders, as above. |
Neither xtk_theme_capture() nor xtk_theme_complete() touches the sections that are settings rather than looks: [behavior], [clipboard], [sizes], [zoom], [zoom-widget] and [zoom-hex].
The settings file
The settings file has the same form as a theme's single keys: [section] lines, and key = value lines under them. A line that starts with # or ; is a comment, and spaces around the key and the value do not count. Xtk has no fixed name or place for the file: the program chooses it.
| Call | What it does |
|---|---|
xtk_config_load() |
Reads a settings file into a config, over what the config already holds. Keys that the toolkit does not know are skipped. Returns 0 when the file cannot be opened. |
xtk_config_set() |
Sets one key, as one line of the file would. |
xtk_config_parse_file() |
Reads any file of this form and calls a function of the program for each key. A program reads its own sections with it (Xtk skips sections it does not know, so a program can keep its own settings in the same file). |
xtk_config_write_defaults(), xtk_config_write_defaults_with_values() |
Write a whole settings file: with the defaults, or with the values of a config. |
xtk_config_color_key_count(), xtk_config_color_key_at(), xtk_config_color_field() |
The list of every color key, by section and key, and the field of a config that a key sets: for a program that lets the user edit colors. |
xtk_config_parse_color(), xtk_config_write_color() |
Read and write a color as the file has it. |
A widget adds its own sections to the toolkit when the program starts (xtk_config_registry.h), and only a widget that is linked into the program does. So with the static library a program reads and writes only the sections of the widgets it uses. The toolkit's own sections, [main], [behavior], [clipboard], [sizes] and the three of the magnifier, are always there.
Every section and key
This is the whole settings file as xtk_config_write_defaults() writes it with every widget linked in, with each key's default. The defaults are the toolkit's own; a theme changes most colors. Each section's block in XtkConfig is described field by field on the API page xtk_config.
The names follow one pattern. color (or foreground) is the text color and background the fill; border the border's color; hover-... is the color while the pointer is over the widget, active-... while it is pressed or open, focus-border the focus ring, selected-... a selected row. font-family (or font) names a font as fontconfig does (DejaVu Sans, monospace), and font-size is its size in pixels. The [widget-widget] sections hold sizes in pixels: width, height, padding, border-width and border-radius (the corners). A color of #00000000 is fully transparent, so the border or fill it names is not seen. A yes or no key takes true or 1 for yes, anything else for no.
| Section | Read by | Keys, with their defaults |
|---|---|---|
[main] |
Every widget: the window color, the default font, the selection and the caret (link-color and link-underline are kept for the program; no widget reads them) |
background = #2E2E2E, color = #E6E6EB, font = DejaVu Sans, font-size = 14, link-color = #598CE6, selection = #598CE6, selection-text = #FFFFFF, cursor-color = #E6E6EB, link-underline = true, theme (the name of the theme in use, written when set) |
[button] |
Buttons (xtk_button), also the buttons inside other widgets and dialogs |
active-background = #1A1A1F, active-border = #598CE5, background = #262626, border = #808080, color = #F2F2F2, focus-border = #80B3FF, font-family = DejaVu Sans, font-size = 12, hover-background = #404047, hover-border = #80B2FF |
[button-widget] |
The size and borders of a button | active-border-width = 1, border-radius = 4, border-width = 1, height = 0, hover-border-width = 1, padding = 8, width = 88 |
[checkbox] |
Check boxes (xtk_checkbox) |
font-family = DejaVu Sans, font-size = 10, color = #D9D9D9 (foreground, its old name, is read too), background = #2E2E2E, border = #897C4F, hover-border = #BCAF82, focus-border = #80B3FF, check-foreground = #D9D9D9, box-size = 16, border-width = 1, border-radius = 2, label-gap = 6 |
[combobox] |
Combo boxes (xtk_combobox) |
background = #262626, border = #808080, color = #F2F2F2, hover-background = #333333, active-background = #405980, focus-border = #80B3FF, font-family = DejaVu Sans, font-size = 12, hover-border = #808080 (the frame under the pointer), dropdown-background = #262626, dropdown-hover-background = #405980, dropdown-hover-color = #F2F2F2 |
[combobox-widget] |
The size and borders of a combo box | width = 230, height = 24, border-width = 1, border-radius = 4, padding = 4 |
[datagrid] |
The table (xtk_datagrid) |
background = #2E2E2E, color = #D9D9D9, alternate-background = #262626, header-background = #2E2E2E, header-foreground = #D9D9D9, selected-background = #3870C7, selected-foreground = #FFFFFF |
[dockframe] |
The dock frame (xtk_dockframe) |
background = #292929, drop-zone-highlight = #598CE6 |
[dockframe-widget] |
How see-through the drop outline of the dock frame is (0 to 255; it needs a compositor) | drop-zone-alpha = 96 |
[entry-hex] |
Entries for hexadecimal colors (ENTRY_HEX) |
background = #262626, border = #808080, color = #F2F2F2, font = DejaVu Sans, font-size = 12, invalid-border = #800000, valid-border = #008000, hover-border = #A6A6A6, focus-border = #80B3FF |
[entry-text] |
Text entries (xtk_entry, ENTRY_TEXT) |
background = #262626, border = #808080, color = #F2F2F2, focus-border = #80B3FF, font = DejaVu Sans, font-size = 12, hover-border = #A6A6A6, invalid-border = #800000, valid-border = #008000 |
[entry-int] |
Entries for whole numbers (ENTRY_INT) |
background = #262626, border = #808080, color = #F2F2F2, focus-border = #80B3FF, font = DejaVu Sans, font-size = 12, hover-border = #A6A6A6, invalid-border = #800000, valid-border = #008000 |
[entry-float] |
Entries for decimal numbers (ENTRY_FLOAT) |
background = #262626, border = #808080, color = #F2F2F2, focus-border = #80B3FF, font = DejaVu Sans, font-size = 12, hover-border = #A6A6A6, invalid-border = #800000, valid-border = #008000 |
[frame] |
Titled frames (xtk_frame) |
border = #595959, font-family = sans, font-size = 11 |
[frame-widget] |
The corners and the title of a frame | border-radius = 6, border-width = 1, title-gap = 6, title-indent = 12 |
[graph] |
The graph (xtk_graph): nodes, edges, the selected node, its neighbors and the most connected nodes |
background = #2E2E2E, node-background = #383838, node-foreground = #D9D9D9, edge = #808080, selected-background = #E68C26, neighbor-background = #BF9959, hub-background = #8C59D9, focus-border = #80B3FF |
[label] |
Labels (xtk_label) |
background = #2E2E2E, border = #00000000, color = #F2F2F2, font = DejaVu Sans, font-size = 12, padding = 4, border-width = 0, border-radius = 0, border-enabled = false (the size keys are used by a label made with -1 for them) |
[menu] |
Popup menus and the menus of the menu bar (xtk_popup_menu); [context-menu] is read as another name for it |
active-background = #454038, background = #363026, border = #8A7D4F, color = #B5965C, font-family = DejaVu Sans, font-size = 14, hover-background = #454038, hover-color = #B5965C, hover-border = #454038 (a line around the highlighted item when it differs from its background), rail-background = #2E4C00, rail-foreground = #81EE00, border-width = 1, border-radius = 4, padding = 8 (the menu's frame, corners and text inset) |
[menubar] |
The menu bar (xtk_menu); the rail is the short message it can show on its right |
active-background = #4D4D4D, background = #2E2E2E, border = #1F1F1F, color = #EBEBEB, font-family = DejaVu Sans, font-size = 14, hover-background = #4D4D4D, hover-color = #EBEBEB, hover-border = #4D4D4D, rail-background = #2E4C00, rail-foreground = #81EE00, border-width = 1, border-radius = 4, padding = 8 (for the menus it drops down) |
[menubar-widget] |
The size and borders of the menu bar: its frame (in the [menubar] border color) and corners. The first title starts against the frame; padding is read but does not move the titles |
border-radius = 4, border-width = 1, padding = 4, width = 278 |
[notebook] |
Tabs (xtk_notebook) |
font-family = sans, font-size = 11, color = #F2F2F2, background = #404040, border = #262626, hover-background = #4D4D4D, active-background = #595959, active-border = #80B3FF, focus-border = #80B3FF, tab-bar-background = #404040, content-background = #2E2E2E, content-foreground = #E6E6E6 |
[notebook-widget] |
The size and borders of the tabs | tab-height = 32, tab-padding = 12, tab-min-width = 80, border-width = 1, border-radius = 4 |
[progressbar] |
Progress bars (xtk_progressbar) |
background = #292929, border = #4D4D4D, fill = #338CE6, fill-pulse = #338CE6, font-family = sans, font-size = 11, text = #F2F2F2 |
[progressbar-widget] |
The size and borders of a progress bar | border-radius = 6, border-width = 1, height = 22 |
[radiobutton] |
Radio buttons (xtk_radiobutton) |
font-family = DejaVu Sans, font-size = 10, color = #D9D9D9, background = #2E2E2E, border = #897C4F, hover-border = #BCAF82, focus-border = #80B3FF, fill-foreground = #D9D9D9, circle-size = 16, border-width = 1, label-gap = 6 |
[scrollbar] |
Scroll bars (xtk_scrollbar, and the scroll bars of other widgets) |
track = #292929, thumb = #666666, thumb-hover = #8C8C8C |
[scrollbar-widget] |
The thickness of a scroll bar and the shortest its thumb gets | thickness = 8, min-thumb-length = 24 |
[slider] |
Sliders (xtk_slider) |
background = #2E2E2E, border = #808080, border-radius = 0, border-width = 1, color = #F2F2F2, fill-background = #598CE6, handle-background = #4D4D4D, handle-border = #808080, handle-focus-border = #80B3FF, handle-foreground = #F2F2F2, handle-height = 0, handle-hover-background = #808080, handle-hover-border = #808080, handle-width = 0, track-background = #1F1F1F, track-border = #808080, track-height = 0 (a size of 0 is worked out from the slider's thickness; the slider draws no text, so it has no font) |
[slider-widget] |
The default size of a slider | width = 200, height = 24 |
[splitpane] |
Split panes (xtk_splitpane), and the dividers of the dock frame |
background = #2E2E2E, divider-background = #404040 |
[splitpane-widget] |
The divider and the smallest a pane gets | divider-thickness = 3, min-size = 32 |
[spinbutton] |
Spin buttons (xtk_spinbutton) |
background = #262626, border = #808080, button-color = #F2F2F2, button-hover-background = #405980, color = #F2F2F2, font-family = DejaVu Sans, font-size = 12, hover-background = #333333, hover-border = #808080, focus-border = #80B3FF, border-width = 1, border-radius = 4, padding = 4, button-width = 0 (0: the [spinbutton-widget] width) |
[spinbutton-widget] |
The size of a spin button and of its + and − buttons (the height is the least height: a larger font makes it taller) | width = 120, height = 24, button-width = 16 |
[statusbar] |
The status bar (xtk_statusbar); the message is the pill on its right |
background = #292929, color = #BFBFBF, border = #4D4D4D, message-background = #4D2E00, message-foreground = #FF8A00 |
[swatch] |
Color swatches (xtk_swatch): border-mode is complementary, inverse, triadic or contrast |
border = #897C4F (the border while a swatch is dragged), border-mode = complementary (a mode read from a file becomes the mode of every swatch without one of its own), border-radius = 4, border-width = 1 |
[swatch-widget] |
The size and borders of a swatch | border-radius = 4, border-width = 1, height = 74, width = 74 |
[textview] |
The text view (xtk_textview) and the rich text view (xtk_richtext); section, key, value, comment, number and hex-color color a settings file shown in a text view, highlight is the highlighter pen |
background = #2E2E2E, border = #4D4D4D, comment = #808080, cursor = #FFFFFF, focus-border = #6699E6, hex-color = #E6B34D, key = #66B3E6, link = #66B3FF, line-numbers = #808080, line-numbers-background = #141414, number = #E6994D, section = #9966CC, selection = #4D80B3, selection-text = #FFFFFF, scrollbar-thumb = #737373, text = #E6E6E6, value = #99CC66, highlight = #EBDC5A |
[tooltip] |
Tooltips (xtk_tooltip); delay-ms is how long the pointer rests before one shows |
background = #252526, color = #DCDCDC, border = #505050, border-width = 1, border-radius = 5, padding = 6, font-family = Sans, font-size = 12, delay-ms = 400 |
[toolwindow] |
Tool windows (xtk_toolwindow): their header, icons, scroll bars and badge |
content-background = #2E2E2E, font-family = DejaVu Sans, font-size = 11, header-background = #383838, header-border = #1F1F1F, header-foreground = #EBEBEB, icon-foreground = #B3B3B3, icon-hover-background = #4D4D4D, icon-hover-foreground = #F2F2F2, scrollbar-thumb = #4D4D4D, scrollbar-track = #141414, titlebar-border = #171717, badge-background = #2E4C00, badge-foreground = #81EE00 |
[toolwindow-widget] |
The size of a tool window's header and icons | border-width = 1, header-height = 28, icon-padding = 8, icon-size = 16 |
[tray-menu] |
The menu of the tray icon (xtk_tray) |
background = #363026, border = #8A7D4F, color = #B5965C, font-family = DejaVu Sans, font-size = 14, hover-background = #454038, hover-color = #B5965C, border-width = 1, border-radius = 4 |
[treeview] |
The tree view (xtk_treeview); unsaved-foreground marks a row the program says is not yet saved |
background = #2E2E2E, border = #595959, branch-line = #999999, font-family = sans-serif, font-size = 11, foreground = #D9D9D9, hover-background = #383838, selected-background = #406699, selected-foreground = #FFFFFF, unsaved-foreground = #F2A626, focus-border = #406699 (the selected background), inactive-selected-background = #344253, inactive-selected-foreground = #D9D9D9 |
[treeview-widget] |
The rows, indent and fold arrows of a tree | border-width = 1, indent-width = 16, row-height = 22, twisty-size = 10 |
[zoom] |
The magnifier (xtk_zoom): its crosshair and square |
crosshair-color = #00C000, square-color = #C00000 |
[behavior] |
The caret of entries and spin buttons (cursor-blink-ms and cursor-color; cursor-width only in entries; cursor-blink-ms also in the text view and the rich text view), the case of the digits of hex entries (upper or lower), and how many undo steps an entry keeps |
cursor-blink-ms = 600, cursor-color = #E6E6EB, cursor-width = 1, hex-case = upper, undo-depth = 64 |
[clipboard] |
Entries: with auto-copy-primary = true, text selected in an entry with the mouse (or with Select All in its menu) becomes the primary selection at once |
auto-copy-primary = false |
[sizes] |
Other names for the width of the menu bar and the size of a swatch | menubar-width = 278, swatch-height = 74, swatch-width = 74 |
[zoom-widget] |
The magnifier: whether the crosshair and square show, before and after a pick | crosshair-show = true, crosshair-show-after-pick = false, square-show = true, square-show-after-pick = false |
[zoom-hex] |
The magnifier's readout of the color under the pointer; position is bottom-right, bottom-left, top-right or top-left |
background = #101020CC, border = #000000, border-show = false, border-width = 1, color = #FFFFFF, font = monospace, font-size = 12, position = bottom-right, show = true |
Where a section has font-family, most also take font as another name for it (and [main], [label], the entries and the magnifier's readout take font-family for font). [frame], [progressbar] and [treeview] take only font-family.
Known limitations
- A value cannot be followed by a comment on the same line: the comment would become part of the value.
- Some keys are read and written but not used by any widget:
[toolwindow-widget](the header and icons have fixed sizes),drop-zone-alphaof[dockframe-widget], andhover-borderof the entries. Of the[splitpane-widget]sizes, the dock frame usesmin-size; a split pane of the program's own uses them only when the program passes them to it. [textview]has no font: the text view draws inmonospaceat 10, the rich text view in DejaVu Sans at 12 pixels, until the program callsxtk_textview_set_font(), orxtk_richtext_set_font_family()andxtk_richtext_set_font_size().- The text view and the rich text view blink their caret every 500 milliseconds, whatever
cursor-blink-mssays.
xtk API
Widgets
- button
- checkbox
- radiobutton
- label
- entry
- textview
- edit_history
- spinbutton
- slider
- progressbar
- combobox
- scrollbar
- swatch
- panel
- statusbar
- tooltip
- toolbar
- icongrid
- iconview
- pathbar
- treeview
- datagrid
- graph
- scheme_wheel
- zoom
- tray
Containers and menus
Dialogs
Rich text
Drawing and images
Color
Configuration and themes
Input and the X server
Safety
Data formats
