Skip to content

Commit

Permalink
Applied review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
iiLubos committed Dec 19, 2023
1 parent 1cf2d6a commit 65e9d6d
Show file tree
Hide file tree
Showing 11 changed files with 61 additions and 17 deletions.
11 changes: 11 additions & 0 deletions app/icons/GlobalFilled.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions app/icons/HomeFilled.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions app/icons/ProjectsFilled.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions app/icons/icons.qrc
Original file line number Diff line number Diff line change
Expand Up @@ -69,5 +69,8 @@
<file>Home.svg</file>
<file>Projects.svg</file>
<file>ZoomToProject.svg</file>
<file>GlobalFilled.svg</file>
<file>HomeFilled.svg</file>
<file>ProjectsFilled.svg</file>
</qresource>
</RCC>
8 changes: 6 additions & 2 deletions app/mmstyle.h
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,6 @@ class MMStyle: public QObject

// Icons
Q_PROPERTY( QUrl addIcon READ addIcon CONSTANT )
Q_PROPERTY( QUrl homeIcon READ homeIcon CONSTANT )
Q_PROPERTY( QUrl layersIcon READ layersIcon CONSTANT )
Q_PROPERTY( QUrl localChangesIcon READ localChangesIcon CONSTANT )
Q_PROPERTY( QUrl mapThemesIcon READ mapThemesIcon CONSTANT )
Expand Down Expand Up @@ -110,8 +109,10 @@ class MMStyle: public QObject
Q_PROPERTY( QUrl facebookIcon READ facebookIcon CONSTANT )
Q_PROPERTY( QUrl globeIcon READ globeIcon CONSTANT )
Q_PROPERTY( QUrl globalIcon READ globalIcon CONSTANT )
Q_PROPERTY( QUrl globalFilledIcon READ globalFilledIcon CONSTANT )
Q_PROPERTY( QUrl hideIcon READ hideIcon CONSTANT )
Q_PROPERTY( QUrl homeIcon READ homeIcon CONSTANT )
Q_PROPERTY( QUrl homeFilledIcon READ homeFilledIcon CONSTANT )
Q_PROPERTY( QUrl infoIcon READ infoIcon CONSTANT )
Q_PROPERTY( QUrl linkedinIcon READ linkedinIcon CONSTANT )
Q_PROPERTY( QUrl mastodonIcon READ mastodonIcon CONSTANT )
Expand All @@ -123,6 +124,7 @@ class MMStyle: public QObject
Q_PROPERTY( QUrl othersIcon READ othersIcon CONSTANT )
Q_PROPERTY( QUrl projectButtonMoreIcon READ projectButtonMoreIcon CONSTANT )
Q_PROPERTY( QUrl projectsIcon READ projectsIcon CONSTANT )
Q_PROPERTY( QUrl projectsFilledIcon READ projectsFilledIcon CONSTANT )
Q_PROPERTY( QUrl qgisIcon READ qgisIcon CONSTANT )
Q_PROPERTY( QUrl qrCodeIcon READ qrCodeIcon CONSTANT )
Q_PROPERTY( QUrl redditIcon READ redditIcon CONSTANT )
Expand Down Expand Up @@ -218,7 +220,6 @@ class MMStyle: public QObject

QUrl addIcon() {return QUrl( "qrc:/Add.svg" );}
QUrl layersIcon() {return QUrl( "qrc:/Layers.svg" );}
QUrl homeIcon() {return QUrl( "qrc:/Home.svg" );}
QUrl localChangesIcon() {return QUrl( "qrc:/LocalChanges.svg" );}
QUrl mapThemesIcon() {return QUrl( "qrc:/MapThemes.svg" );}
QUrl positionTrackingIcon() {return QUrl( "qrc:/PositionTracking.svg" );}
Expand Down Expand Up @@ -246,8 +247,10 @@ class MMStyle: public QObject
QUrl facebookIcon() {return QUrl( "qrc:/Facebook.svg" );}
QUrl globeIcon() {return QUrl( "qrc:/Globe.svg" );}
QUrl globalIcon() {return QUrl( "qrc:/Global.svg" );}
QUrl globalFilledIcon() {return QUrl( "qrc:/GlobalFilled.svg" );}
QUrl hideIcon() {return QUrl( "qrc:/Hide.svg" );}
QUrl homeIcon() {return QUrl( "qrc:/Home.svg" );}
QUrl homeFilledIcon() {return QUrl( "qrc:/HomeFilled.svg" );}
QUrl infoIcon() {return QUrl( "qrc:/Info.svg" );}
QUrl linkedinIcon() {return QUrl( "qrc:/Linkedin.svg" );}
QUrl mastodonIcon() {return QUrl( "qrc:/Mastodon.svg" );}
Expand All @@ -259,6 +262,7 @@ class MMStyle: public QObject
QUrl othersIcon() {return QUrl( "qrc:/Others.svg" );}
QUrl projectButtonMoreIcon() {return QUrl( "qrc:/ProjectButtonMore.svg" );}
QUrl projectsIcon() {return QUrl( "qrc:/Projects.svg" );}
QUrl projectsFilledIcon() {return QUrl( "qrc:/ProjectsFilled.svg" );}
QUrl qgisIcon() {return QUrl( "qrc:/QGIS.svg" );}
QUrl qrCodeIcon() {return QUrl( "qrc:/QRCode.svg" );}
QUrl redditIcon() {return QUrl( "qrc:/Reddit.svg" );}
Expand Down
10 changes: 2 additions & 8 deletions app/qml/components/MMSelectableToolbar.qml
Original file line number Diff line number Diff line change
Expand Up @@ -17,22 +17,16 @@ Rectangle {
property alias model: buttonView.model
property alias index: buttonView.currentIndex

anchors {
left: parent.left
right: parent.right
bottom: parent.bottom
}
height: __style.toolbarHeight
color: __style.forestColor

GridView {
id: buttonView

anchors.fill: parent
leftMargin: 20 * __dp
rightMargin: 20 * __dp

cellHeight: __style.toolbarHeight
cellWidth: Math.floor((control.width - leftMargin - rightMargin) / control.model.count)
cellWidth: Math.floor(control.width / control.model.count)

highlightFollowsCurrentItem: false
}
Expand Down
7 changes: 4 additions & 3 deletions app/qml/components/MMSelectableToolbarButton.qml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ Item {

signal clicked

required property var iconSource
required property url iconSource
required property url selectedIconSource
required property string text

property bool checked: false
Expand All @@ -36,9 +37,9 @@ Item {

anchors.horizontalCenter: parent.horizontalCenter
anchors.bottom: parent.bottom
anchors.bottomMargin: 40 * __dp
anchors.bottomMargin: 44 * __dp

source: control.iconSource
source: control.checked ? control.selectedIconSource : control.iconSource
color: control.checked ? __style.whiteColor : __style.mediumGreenColor
}

Expand Down
4 changes: 1 addition & 3 deletions app/qml/components/MMToolbar.qml
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,6 @@ Rectangle {

model: visibleButtonModel
anchors.fill: parent
leftMargin: 20 * __dp
rightMargin: 20 * __dp
cellHeight: __style.toolbarHeight
interactive: false
}
Expand Down Expand Up @@ -75,7 +73,7 @@ Rectangle {
function setupBottomBar() {
var m = control.model
var c = m.count
var w = control.width - 40 * __dp
var w = control.width
var button

// add all buttons (max 4) into toolbar
Expand Down
2 changes: 1 addition & 1 deletion app/qml/components/MMToolbarLongButton.qml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ Item {

Button {
width: {
var w = parent.width - 10 * __dp
var w = parent.width - 40 * __dp
if(w < control.minimumToolbarLongButtonWidth)
return control.minimumToolbarLongButtonWidth
else if(w > control.maximumToolbarLongButtonWidth)
Expand Down
15 changes: 15 additions & 0 deletions gallery/qml/pages/IconsPage.qml
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,11 @@ ScrollView {
source: __style.globalIcon
colorise: true
}
IconBox {
text: "globalFilledIcon"
source: __style.globalFilledIcon
colorise: true
}
IconBox {
text: "hideIcon"
source: __style.hideIcon
Expand All @@ -111,6 +116,11 @@ ScrollView {
source: __style.homeIcon
colorise: true
}
IconBox {
text: "homeFilledIcon"
source: __style.homeFilledIcon
colorise: true
}
IconBox {
text: "infoIcon"
source: __style.infoIcon
Expand All @@ -134,6 +144,11 @@ ScrollView {
source: __style.projectsIcon
colorise: true
}
IconBox {
text: "projectsFilledIcon"
source: __style.projectsFilledIcon
colorise: true
}
IconBox {
text: "qrCodeIcon"
source: __style.qrCodeIcon
Expand Down
9 changes: 9 additions & 0 deletions gallery/qml/pages/ToolbarPage.qml
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,20 @@ Page {
MMSelectableToolbar {
id: selectableToolbar

anchors {
left: parent.left
right: parent.right
bottom: parent.bottom
}

Component.onCompleted: index = 1

model: ObjectModel {
MMSelectableToolbarButton {
width: Math.floor((pane.width - 40 * __dp) / 3)
text: "Home"
iconSource: __style.homeIcon
selectedIconSource: __style.homeFilledIcon
checked: selectableToolbar.index === 0
onClicked: {
selectableToolbar.index = 0
Expand All @@ -36,6 +43,7 @@ Page {
width: Math.floor((pane.width - 40 * __dp) / 3)
text: "Projects"
iconSource: __style.projectsIcon
selectedIconSource: __style.projectsFilledIcon
checked: selectableToolbar.index === 1
onClicked: {
selectableToolbar.index = 1
Expand All @@ -46,6 +54,7 @@ Page {
width: Math.floor((pane.width - 40 * __dp) / 3)
text: "Explore"
iconSource: __style.globalIcon
selectedIconSource: __style.globalFilledIcon
checked: selectableToolbar.index === 2
onClicked: {
selectableToolbar.index = 2
Expand Down

1 comment on commit 65e9d6d

@inputapp-bot
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

iOS - version 23.12.500311 just submitted!

Please sign in to comment.