Filesystem Explorer: Add a minimum width and height
This prevents to reduce the window to a minimum of 1px (default), where
it gets hard to expand the window again. As a drive-by improve the
visualization of highlighted files.
Fixes: QTBUG-119785
Change-Id: Ib4a7f37fa4886589bad4cce534a9d73c352dd4ee
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
(cherry picked from commit eaaa8647da
)
This commit is contained in:
parent
8e45afd0fa
commit
c3c98748eb
|
@ -16,6 +16,8 @@ ApplicationWindow {
|
|||
|
||||
width: 1100
|
||||
height: 600
|
||||
minimumWidth: 200
|
||||
minimumHeight: 100
|
||||
visible: true
|
||||
color: Colors.background
|
||||
flags: Qt.Window | Qt.FramelessWindowHint
|
||||
|
|
|
@ -78,11 +78,20 @@ Rectangle {
|
|||
|
||||
anchors.fill: directoryIcon
|
||||
source: directoryIcon
|
||||
|
||||
colorizationColor: (treeDelegate.expanded && treeDelegate.hasChildren)
|
||||
? Colors.color2 : Colors.folder
|
||||
colorization: 1.0
|
||||
brightness: 1.0
|
||||
colorizationColor: {
|
||||
const isFile = treeDelegate.index === fileSystemTreeView.lastIndex
|
||||
&& !treeDelegate.hasChildren;
|
||||
if (isFile)
|
||||
return Qt.lighter(Colors.folder, 3)
|
||||
|
||||
const isExpandedFolder = treeDelegate.expanded && treeDelegate.hasChildren;
|
||||
if (isExpandedFolder)
|
||||
return Colors.color2
|
||||
else
|
||||
return Colors.folder
|
||||
}
|
||||
}
|
||||
|
||||
HoverHandler {
|
||||
|
|
Loading…
Reference in New Issue