Fix JSON editor rounded footer

This commit is contained in:
Alex Spataru 2021-11-19 11:37:49 -06:00
parent 8986a3e6d0
commit a74517cb09
3 changed files with 27 additions and 19 deletions

View File

@ -27,7 +27,7 @@ import "../Widgets" as Widgets
Rectangle { Rectangle {
id: root id: root
radius: jsonEditor.radius color: Cpp_ThemeManager.toolbarGradient2
height: footer.implicitHeight + 4 * app.spacing height: footer.implicitHeight + 4 * app.spacing
// //
@ -37,13 +37,29 @@ Rectangle {
signal scrollToBottom() signal scrollToBottom()
// //
// Background & border // Radius compensator
// //
border.width: 1 Rectangle {
border.color: Cpp_ThemeManager.toolbarGradient1 color: root.color
gradient: Gradient { height: root.radius
GradientStop { position: 0; color: Cpp_ThemeManager.toolbarGradient1 } anchors {
GradientStop { position: 1; color: Cpp_ThemeManager.toolbarGradient2 } top: parent.top
left: parent.left
right: parent.right
}
}
//
// Top border
//
Rectangle {
height: 1
color: Cpp_ThemeManager.toolbarGradient1
anchors {
top: parent.top
left: parent.left
right: parent.right
}
} }
// //

View File

@ -34,19 +34,10 @@ Rectangle {
// //
Rectangle { Rectangle {
id: bg id: bg
border.width: 1
anchors.fill: parent anchors.fill: parent
color: Cpp_ThemeManager.toolbarGradient2
gradient: Gradient { border.color: Qt.darker(Cpp_ThemeManager.toolbarGradient2, 1.5)
GradientStop { position: 0; color: Cpp_ThemeManager.toolbarGradient1 }
GradientStop { position: 1; color: Cpp_ThemeManager.toolbarGradient2 }
}
Rectangle {
border.width: 1
anchors.fill: parent
color: "transparent"
border.color: Qt.darker(Cpp_ThemeManager.toolbarGradient2, 1.5)
}
Rectangle { Rectangle {
height: 1 height: 1

View File

@ -123,6 +123,7 @@ FramelessWindow.CustomWindow {
// //
Footer { Footer {
id: footer id: footer
radius: root.radius
onCloseWindow: root.close() onCloseWindow: root.close()
onScrollToBottom: groupEditor.scrollToBottom() onScrollToBottom: groupEditor.scrollToBottom()