docs
Loading...
Searching...
No Matches
DividerStyle

#include <AppCore/layout/DividerStyle.h>

Overview

Line thickness, colors, and grab width for draggable pane dividers.

Resizable Containers place draggable dividers between direct children so users can adjust split panes in a window. DividerStyle controls the appearance of those dividers and the size of their pointer hit target.

Pass a style to Window::SetDividerStyle() to format dividers across the window:

window->SetDividerStyle({ .visual_thickness = 1, .color = "#3c3c3c" });

Window and Container Styles

You can configure dividers across the window or on an individual container:

  • Window::SetDividerStyle() sets the baseline for all dividers in the window. Any field left unset (a zero width or an unset Color) falls back to the built-in defaults.
  • Container::SetDividerStyle() overrides the window style for dividers between that container's direct children. Any field left unset falls back to the window's style, while passing a default-constructed DividerStyle clears the override.

Set an override on a container to change specific properties:

window->layout()->AddRow({ .key = "body", .resizable = true });
body->SetDividerStyle({ .hover_color = "#0078d4" }); // the rest comes from the window
A nullable smart pointer.
Definition RefPtr.h:126
Note
Dividers paint no line by default (an unset color lets the window background show through).
See also
Window::SetDividerStyle(), Container::SetDividerStyle(), ContainerOptions::resizable

Public Attributes

double hit_width = 0.0
 The width of the divider's pointer target, in logical px.
double visual_thickness = 0.0
 The thickness of the painted divider line, in logical px.
Color color
 The color of the divider line.
Color hover_color
 The hover highlight color, painted over the divider while the pointer rests on it or drags it.

Member Data Documentation

◆ color

Color color

The color of the divider line.

Unset means no line is painted and the window background shows through.

◆ hit_width

double hit_width = 0.0

The width of the divider's pointer target, in logical px.

(Default: 6)

◆ hover_color

Color hover_color

The hover highlight color, painted over the divider while the pointer rests on it or drags it.

(Default: a half-opacity gray)

◆ visual_thickness

double visual_thickness = 0.0

The thickness of the painted divider line, in logical px.

(Default: 1)


The documentation for this struct was generated from the following file: