Format with qmlformat.

This commit is contained in:
2026-02-02 18:08:37 -05:00
parent 5af09485a3
commit 29024e3999
8 changed files with 280 additions and 273 deletions

View File

@@ -10,32 +10,8 @@ import clide.module 1.0
MenuBar {
// Background for this MenuBar.
background: Rectangle {
color: RustColors.menubar
border.color: RustColors.explorer_background
}
// Base settings for each Menu.
component ClideMenu : Menu {
background: Rectangle {
color: RustColors.explorer_background
implicitWidth: 100
radius: 2
}
}
// Base settings for each MenuItem.
component ClideMenuItem : MenuItem {
id: root
background: Rectangle {
color: root.hovered ? RustColors.hovered : RustColors.unhovered
radius: 1.0
}
contentItem: IconLabel {
color: "black"
font.family: "Helvetica"
text: root.text
}
color: RustColors.menubar
}
//
@@ -70,6 +46,7 @@ MenuBar {
}
ClideMenuItem {
action: actionOpen
onTriggered: FileSystem.setDirectory(FileSystem.filePath)
}
ClideMenuItem {
@@ -162,8 +139,8 @@ MenuBar {
// Help Menu
ClideAboutWindow {
id: clideAbout
}
}
Action {
id: actionDocumentation
@@ -171,10 +148,11 @@ MenuBar {
}
Action {
id: actionAbout
// Toggle the about window with the menu item is clicked.
onTriggered: clideAbout.visible = !clideAbout.visible
text: qsTr("&About")
// Toggle the about window with the menu item is clicked.
onTriggered: clideAbout.visible = !clideAbout.visible
}
ClideMenu {
title: qsTr("&Help")
@@ -186,4 +164,28 @@ MenuBar {
action: actionAbout
}
}
// Base settings for each Menu.
component ClideMenu: Menu {
background: Rectangle {
color: RustColors.explorer_background
implicitWidth: 100
radius: 2
}
}
// Base settings for each MenuItem.
component ClideMenuItem: MenuItem {
id: root
background: Rectangle {
color: root.hovered ? RustColors.hovered : RustColors.unhovered
radius: 1.0
}
contentItem: IconLabel {
color: "black"
font.family: "Helvetica"
text: root.text
}
}
}