-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[ui] Custom SplitView to have a larger handle
- Loading branch information
1 parent
ccd88c4
commit 2852a4c
Showing
6 changed files
with
32 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import QtQuick 2.15 | ||
import QtQuick.Controls 2.15 | ||
|
||
SplitView { | ||
id: splitView | ||
|
||
handle: Item { | ||
id: handleDelegate | ||
implicitWidth: 5 | ||
implicitHeight: 5 | ||
property bool hovered: SplitHandle.hovered | ||
property bool pressed: SplitHandle.pressed | ||
Rectangle { | ||
id: handleDisplay | ||
anchors.centerIn: parent | ||
property int handleSize: handleDelegate.hovered ? 3 : 1 | ||
width: splitView.orientation === Qt.Horizontal ? handleSize : handleDelegate.width | ||
height: splitView.orientation === Qt.Vertical ? handleSize : handleDelegate.height | ||
color: handleDelegate.pressed ? Qt.lighter(palette.highlight, 1.5) | ||
: (handleDelegate.hovered ? palette.highlight : palette.base) | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,7 +15,7 @@ Page { | |
} | ||
} | ||
|
||
SplitView { | ||
MSplitView { | ||
id: splitView | ||
anchors.fill: parent | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters