Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions examples/qml/FramelessWindow.qml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import QWindowKit 1.0

Window {
property bool showWhenReady: true
property alias titleBar: titleBar

id: window
width: 800
Expand Down
31 changes: 27 additions & 4 deletions examples/qml/main.qml
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,36 @@ FramelessWindow {
showWhenReady: false
}

Button {
Drawer {
id: drawer
width: 0.66 * parent.width
height: parent.height
edge: Qt.RightEdge
onAboutToShow: titleBar.enabled = false
onAboutToHide: titleBar.enabled = true

Label {
text: "Content goes here!"
anchors.centerIn: parent
}
}

Row {
anchors {
horizontalCenter: parent.horizontalCenter
bottom: parent.bottom
bottomMargin: 20
}
text: qsTr("Open Child Window")
onClicked: childWindow.visible = true
spacing: 10

Button {
text: qsTr("Open Child Window")
onClicked: childWindow.visible = true
}

Button {
text: qsTr("Open Drawer")
onClicked: drawer.visible = true
}
}
}
}
2 changes: 1 addition & 1 deletion src/core/contexts/abstractwindowcontext.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ namespace QWK {
*button = WindowAgentBase::Unknown;
for (int i = WindowAgentBase::WindowIcon; i <= WindowAgentBase::Close; ++i) {
auto currentButton = m_systemButtons[i];
if (!currentButton || !m_delegate->isVisible(currentButton)) {
if (!currentButton || !m_delegate->isVisible(currentButton) || !m_delegate->isEnabled(currentButton)) {
continue;
}
if (m_delegate->mapGeometryToScene(currentButton).contains(pos)) {
Expand Down