Skip to content

Commit

Permalink
Make ScrollBarCornerFiller Windows specific
Browse files Browse the repository at this point in the history
  • Loading branch information
timangus committed Oct 17, 2023
1 parent 93aa0f4 commit ed0e4b4
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 19 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
/* Copyright © 2013-2023 Graphia Technologies Ltd.
*
* This file is part of Graphia.
*
* Graphia is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Graphia is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with Graphia. If not, see <http://www.gnu.org/licenses/>.
*/

import QtQuick
import QtQuick.Controls

Rectangle
{
property ScrollBar horizontalScrollBar
property ScrollBar verticalScrollBar

width: verticalScrollBar && verticalScrollBar.size < 1 ? verticalScrollBar.width : 0
height: horizontalScrollBar && horizontalScrollBar.size < 1 ? horizontalScrollBar.height : 0

anchors.right: parent.right
anchors.bottom: parent.bottom

color:
{
if(!horizontalScrollBar || !horizontalScrollBar.background)
return "transparent";

if(!verticalScrollBar || !verticalScrollBar.background)
return "transparent";

return palette.midlight;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -17,27 +17,9 @@
*/

import QtQuick
import QtQuick.Controls

Rectangle
Item
{
property ScrollBar horizontalScrollBar
property ScrollBar verticalScrollBar

width: verticalScrollBar && verticalScrollBar.size < 1 ? verticalScrollBar.width : 0
height: horizontalScrollBar && horizontalScrollBar.size < 1 ? horizontalScrollBar.height : 0

anchors.right: parent.right
anchors.bottom: parent.bottom

color:
{
if(!horizontalScrollBar || !horizontalScrollBar.background)
return "transparent";

if(!verticalScrollBar || !verticalScrollBar.background)
return "transparent";

return palette.midlight;
}
}
1 change: 1 addition & 0 deletions source/shared/ui/shared.qrc
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
<file>qml/app/graphia/Shared/Controls/+nativemenu/PlatformMenuSeparator.qml</file>
<file>qml/app/graphia/Shared/Controls/PointingCursorOnHoverLink.qml</file>
<file>qml/app/graphia/Shared/Controls/SaveFileDialog.qml</file>
<file>qml/app/graphia/Shared/Controls/+windows/ScrollBarCornerFiller.qml</file>
<file>qml/app/graphia/Shared/Controls/ScrollBarCornerFiller.qml</file>
<file>qml/app/graphia/Shared/Controls/ScrollableTextArea.qml</file>
<file>qml/app/graphia/Shared/Controls/SlidingPanel.qml</file>
Expand Down

0 comments on commit ed0e4b4

Please sign in to comment.