// Copyright © SixtyFPS GmbH // SPDX-License-Identifier: MIT import { BaseButton } from "./base_button.slint"; import { Typography } from "../styling/typography.slint"; import { MaterialPalette } from "../styling/material_palette.slint"; export component OutlineButton { in property icon <=> base.icon; in property text <=> base.text; in property enabled <=> base.enabled; in property tooltip <=> base.tooltip; callback clicked <=> base.clicked; accessible-role: button; accessible-enabled: root.enabled; accessible-label: root.text == "" ? root.tooltip : root.text; accessible-action-default => { base.clicked(); } base := BaseButton { border_radius: border.border_radius; color: MaterialPalette.primary; } border := Rectangle { border_radius: root.height / 2; border_width: 1px; border_color: MaterialPalette.outline; width: 100%; height: 100%; } states [ disabled when !root.enabled : { base.color: MaterialPalette.on_surface; base.transparent_background: true; border.border_color: MaterialPalette.on_surface; border.opacity: MaterialPalette.state_layer_opacity_hover; } ] }