RoundOutlineButton

A simple round button that can nether display an icon or a single character with an outline border.

Properties

  • text (in string): The text written in the button.
  • icon (in image): The image to show in the button. Note that not all styles support drawing icons.
  • primary (in bool): If set to true the button is displayed with the primary accent color (default: false).
  • has_focus: (out bool): Set to true when the button has keyboard focus.
  • has_hover: (out bool): Set to true when the mouse if over the button.
  • pressed: (out bool): Set to true when the button is pressed.
  • enabled: (in bool): Defaults to true. When false, the button cannot be pressed

Callbacks

  • clicked()

Example

import { RoundOutlineButton } from "@coop/lib.slint";

export component Example inherits Window {
    VerticalBox {
        RoundOutlineButton {
            text: "C";
            clicked => { self.text = "Clicked"; }
        }
    }
}