Compare commits

...

2 Commits

Author SHA1 Message Date
fdfc8d3fd8 Add context menu on breadcrumbs.
The only option is to reset the root directory.
2026-02-01 18:52:48 -05:00
b9eee50e52 Fix menu bar colors. 2026-02-01 18:42:21 -05:00
4 changed files with 29 additions and 18 deletions

View File

@ -8,10 +8,16 @@ import QtQuick.Controls
import clide.module 1.0 import clide.module 1.0
MenuBar { MenuBar {
// Background for this MenuBar.
background: Rectangle {
color: RustColors.menubar
border.color: RustColors.explorer_background
}
// Base settings for each Menu. // Base settings for each Menu.
component ClideMenu : Menu { component ClideMenu : Menu {
background: Rectangle { background: Rectangle {
color: RustColors.menubar color: RustColors.explorer_background
implicitWidth: 100 implicitWidth: 100
radius: 2 radius: 2
} }
@ -23,7 +29,7 @@ MenuBar {
background: Rectangle { background: Rectangle {
color: root.hovered ? RustColors.hovered : RustColors.unhovered color: root.hovered ? RustColors.hovered : RustColors.unhovered
radius: 2.5 radius: 1.0
} }
contentItem: IconLabel { contentItem: IconLabel {
color: "black" color: "black"
@ -32,13 +38,6 @@ MenuBar {
} }
} }
// Background for this MenuBar.
background: Rectangle {
color: RustColors.menubar
border.color: RustColors.menubar_border
}
// //
// File Menu // File Menu
Action { Action {
@ -79,7 +78,7 @@ MenuBar {
MenuSeparator { MenuSeparator {
background: Rectangle { background: Rectangle {
border.color: color border.color: color
color: RustColors.menubar_border color: RustColors.explorer_background
implicitHeight: 3 implicitHeight: 3
implicitWidth: 200 implicitWidth: 200
} }

View File

@ -59,6 +59,24 @@ SplitView {
horizontalAlignment: Text.AlignHCenter horizontalAlignment: Text.AlignHCenter
verticalAlignment: Text.AlignVCenter verticalAlignment: Text.AlignVCenter
} }
TapHandler {
acceptedButtons: Qt.RightButton
onSingleTapped: (eventPoint, button) => {
contextMenu.popup()
}
}
Menu {
id: contextMenu
Action {
text: qsTr("Reset root index")
onTriggered: {
console.log("Resetting root directory: " + clideTreeView.originalRootDirectory)
clideTreeView.rootDirectory = clideTreeView.originalRootDirectory
}
}
}
} }
ClideTreeView { ClideTreeView {

View File

@ -19,13 +19,7 @@ ApplicationWindow {
required property string appContextPath required property string appContextPath
menuBar: ClideMenuBar { menuBar: ClideMenuBar { }
}
Rectangle {
anchors.fill: parent
color: RustColors.gutter
}
MessageDialog { MessageDialog {
id: errorDialog id: errorDialog

View File

@ -75,7 +75,7 @@ impl Default for RustColorsImpl {
hovered: QColor::try_from("#303234").unwrap(), hovered: QColor::try_from("#303234").unwrap(),
unhovered: QColor::try_from("#3c3f41").unwrap(), unhovered: QColor::try_from("#3c3f41").unwrap(),
pressed: QColor::try_from("#4b4f51").unwrap(), pressed: QColor::try_from("#4b4f51").unwrap(),
menubar: QColor::try_from("#3c3f41").unwrap(), menubar: QColor::try_from("#262626").unwrap(),
menubar_border: QColor::try_from("#575757").unwrap(), menubar_border: QColor::try_from("#575757").unwrap(),
scrollbar: QColor::try_from("#4b4f51").unwrap(), scrollbar: QColor::try_from("#4b4f51").unwrap(),
scrollbar_active: QColor::try_from("#4b4f51").unwrap(), scrollbar_active: QColor::try_from("#4b4f51").unwrap(),