-
Notifications
You must be signed in to change notification settings - Fork 65
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2938 from MerginMaps/dev-redesign_ProjectItem
Base new design of Project item
- Loading branch information
Showing
13 changed files
with
578 additions
and
0 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 |
---|---|---|
@@ -0,0 +1,107 @@ | ||
/*************************************************************************** | ||
* * | ||
* This program 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 2 of the License, or * | ||
* (at your option) any later version. * | ||
* * | ||
***************************************************************************/ | ||
|
||
import QtQuick | ||
import QtQuick.Controls | ||
import QtQuick.Controls.Basic | ||
|
||
Drawer { | ||
id: control | ||
|
||
property alias title: title.text | ||
property alias model: listView.model | ||
|
||
padding: 20 * __dp | ||
|
||
signal clicked(type: string) | ||
|
||
width: window.width | ||
height: mainColumn.height | ||
edge: Qt.BottomEdge | ||
|
||
Rectangle { | ||
color: roundedRect.color | ||
anchors.top: parent.top | ||
anchors.left: parent.left | ||
anchors.right: parent.right | ||
height: 2 * radius | ||
anchors.topMargin: -radius | ||
radius: 20 * __dp | ||
} | ||
|
||
Rectangle { | ||
id: roundedRect | ||
|
||
anchors.fill: parent | ||
color: __style.whiteColor | ||
|
||
Column { | ||
id: mainColumn | ||
|
||
width: parent.width | ||
spacing: 20 * __dp | ||
leftPadding: control.padding | ||
rightPadding: control.padding | ||
bottomPadding: control.padding | ||
|
||
Row { | ||
width: parent.width - 2 * control.padding | ||
anchors.horizontalCenter: parent.horizontalCenter | ||
|
||
Item { width: closeButton.width; height: 1 } | ||
|
||
Text { | ||
id: title | ||
|
||
anchors.verticalCenter: parent.verticalCenter | ||
font: __style.t2 | ||
width: parent.width - closeButton.width * 2 | ||
color: __style.forestColor | ||
horizontalAlignment: Text.AlignHCenter | ||
verticalAlignment: Text.AlignVCenter | ||
elide: Text.ElideRight | ||
} | ||
|
||
Image { | ||
id: closeButton | ||
|
||
source: __style.closeButtonIcon | ||
|
||
MouseArea { | ||
anchors.fill: parent | ||
onClicked: control.visible = false | ||
} | ||
} | ||
} | ||
|
||
ListView { | ||
id: listView | ||
|
||
width: parent.width - 2 * control.padding | ||
height: control.model ? control.model.count * __style.menuDrawerHeight : 0 | ||
interactive: false | ||
|
||
delegate: Item { | ||
width: listView.width | ||
height: __style.menuDrawerHeight | ||
|
||
MMListDrawerItem { | ||
width: listView.width | ||
|
||
type: model.type | ||
text: model.name | ||
iconSource: model.iconSource | ||
|
||
onClicked: function(type) { control.clicked(type); control.visible = false } | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} |
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,58 @@ | ||
/*************************************************************************** | ||
* * | ||
* This program 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 2 of the License, or * | ||
* (at your option) any later version. * | ||
* * | ||
***************************************************************************/ | ||
|
||
import QtQuick | ||
import QtQuick.Controls | ||
import QtQuick.Controls.Basic | ||
|
||
Item { | ||
id: control | ||
|
||
signal clicked(type: string) | ||
|
||
required property string type | ||
required property string text | ||
required property var iconSource | ||
|
||
width: control.width | ||
height: __style.menuDrawerHeight | ||
|
||
Rectangle { | ||
anchors.top: parent.top | ||
width: parent.width | ||
height: 1 * __dp | ||
color: __style.grayColor | ||
} | ||
|
||
Row { | ||
height: parent.height | ||
width: parent.width | ||
spacing: 10 * __dp | ||
|
||
MMIcon { | ||
height: parent.height | ||
width: 20 * __dp | ||
color: __style.forestColor | ||
source: control.iconSource ?? "" | ||
} | ||
|
||
Text { | ||
height: parent.height | ||
verticalAlignment: Text.AlignVCenter | ||
text: control.text | ||
color: __style.nightColor | ||
font: __style.t3 | ||
} | ||
} | ||
|
||
MouseArea { | ||
anchors.fill: parent | ||
onClicked: control.clicked(control.type) | ||
} | ||
} |
Oops, something went wrong.
097422d
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
iOS - version 23.12.494411 just submitted!