Loading files
This file is pinned to the selected release. Download the original to open it in your design tool.
ce705b508This file is pinned to the selected release. Download the original to open it in your design tool.
import { Data } from "api.slint";
export component Tab inherits FocusScope {
in property <bool> show-watermark: false;
// Focus scope is only required for the key-pressed() event.
enabled: false;
focus-on-tab-navigation: false;
// Not sure if this is a good idea, but e.g. when switching to a different
// tab it can happen that no element has the focus anymore which breaks
// keyboard input handling. This workaround ensures the newly opened tab
// gets the focus.
init => {
self.focus();
}
if show-watermark: Image {
width: min(root.width * 0.25, 200px);
height: self.width;
image-fit: contain;
colorize: Data.theme.base.mix(Data.theme.window, 0.4);
source: @image-url("../../../img/app/librepcb-monochrome.svg");
}
@children
}