gui #17
@@ -10,7 +10,6 @@ import clide.module 1.0
|
||||
MenuBar {
|
||||
// Background for this MenuBar.
|
||||
background: Rectangle {
|
||||
border.color: RustColors.explorer_background
|
||||
color: RustColors.menubar
|
||||
}
|
||||
|
||||
@@ -169,6 +168,7 @@ MenuBar {
|
||||
component ClideMenu: Menu {
|
||||
background: Rectangle {
|
||||
color: RustColors.explorer_background
|
||||
border.color: Qt.darker(RustColors.menubar, 2)
|
||||
implicitWidth: 100
|
||||
radius: 2
|
||||
}
|
||||
|
||||
@@ -57,10 +57,12 @@ TreeView {
|
||||
indentation: 12
|
||||
|
||||
background: Rectangle {
|
||||
color: current ? RustColors.explorer_text_selected : "transparent"
|
||||
color: current ? RustColors.explorer_folder_open : "transparent"
|
||||
radius: 2.5
|
||||
}
|
||||
contentItem: Text {
|
||||
anchors.left: directoryIcon.right
|
||||
anchors.leftMargin: 5
|
||||
color: RustColors.explorer_text
|
||||
text: treeDelegate.fileName
|
||||
}
|
||||
@@ -86,9 +88,18 @@ TreeView {
|
||||
source: setSourceImage()
|
||||
sourceSize.height: 15
|
||||
sourceSize.width: 15
|
||||
x: treeDelegate.leftMargin + (treeDelegate.depth * treeDelegate.indentation)
|
||||
x: treeDelegate.leftMargin + (treeDelegate.depth * treeDelegate.indentation) + (indicator.visible ? indicator.width : 0)
|
||||
}
|
||||
|
||||
Label {
|
||||
id: indicator
|
||||
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
font.pixelSize: 10
|
||||
text: expanded ? "⮟" : "⮞"
|
||||
visible: isTreeNode && hasChildren
|
||||
x: padding + (depth * indentation)
|
||||
}
|
||||
MultiEffect {
|
||||
id: iconOverlay
|
||||
|
||||
@@ -120,10 +131,8 @@ TreeView {
|
||||
case Qt.LeftButton:
|
||||
if (treeDelegate.hasChildren) {
|
||||
fileSystemTreeView.toggleExpanded(treeDelegate.row);
|
||||
// fileSystemTreeView.lastIndex = treeDelegate.index
|
||||
} else {
|
||||
// If this model item doesn't have children, it means it's
|
||||
// representing a file.
|
||||
// If this model item doesn't have children, it means it's representing a file.
|
||||
fileSystemTreeView.fileClicked(treeDelegate.filePath);
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -103,7 +103,7 @@ impl Default for RustColorsImpl {
|
||||
explorer_text_selected: QColor::try_from("#262626").unwrap(),
|
||||
explorer_background: QColor::try_from("#1E1F22").unwrap(),
|
||||
explorer_folder: QColor::try_from("#54585b").unwrap(),
|
||||
explorer_folder_open: QColor::try_from("#2b2b2b").unwrap(),
|
||||
explorer_folder_open: QColor::try_from("#393B40").unwrap(),
|
||||
terminal_background: QColor::try_from("#111111").unwrap(),
|
||||
info_log: QColor::try_from("#C4FFFF").unwrap(),
|
||||
debug_log: QColor::try_from("#9148AF").unwrap(),
|
||||
|
||||
Reference in New Issue
Block a user