Skip to content

Commit

Permalink
Rename 'icon' properties to 'iconName' to avoid collisions with reser…
Browse files Browse the repository at this point in the history
…ved prop names (#116)

Co-authored-by: Mikhail Milikhin <[email protected]>
  • Loading branch information
milikhin and Mikhail Milikhin authored May 23, 2021
1 parent fd7af4c commit 2f3786d
Show file tree
Hide file tree
Showing 12 changed files with 32 additions and 32 deletions.
2 changes: 1 addition & 1 deletion ubports-seabass/manifest.json.in
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"content-hub": "content-hub.json"
}
},
"version": "1.0.0",
"version": "1.0.1",
"maintainer": "Mikhael Milikhin <[email protected]>",
"framework" : "ubuntu-sdk-16.04.5"
}
2 changes: 1 addition & 1 deletion ubports-seabass/po/seabass2.mikhael.pot
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: seabass2.mikhael\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2021-05-07 09:14+0000\n"
"POT-Creation-Date: 2021-05-23 18:23+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <[email protected]>\n"
Expand Down
2 changes: 1 addition & 1 deletion ubports-seabass/qml/Main.qml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ ApplicationWindow {
readonly property bool isWide: width >= Suru.units.gu(100)
readonly property string defaultTitle: i18n.tr("Welcome")
readonly property string defaultSubTitle: i18n.tr("Seabass2")
readonly property string version: "1.0.0"
readonly property string version: "1.0.1"
property bool hasBuildContainer: false
property int activeTheme: parseInt(settings.theme)

Expand Down
16 changes: 8 additions & 8 deletions ubports-seabass/qml/components/Header.qml
Original file line number Diff line number Diff line change
Expand Up @@ -39,47 +39,47 @@ CustomComponents.ToolBar {
}

CustomComponents.ToolButton {
icon: "package-x-generic-symbolic"
iconName: "package-x-generic-symbolic"
visible: buildable
enabled: buildEnabled
onClicked: buildRequested()
}
CustomComponents.ToolButton {
icon: "terminal-app-symbolic"
iconName: "terminal-app-symbolic"
enabled: terminalEnabled
onClicked: openTerminalApp()
}
CustomComponents.ToolButton {
icon: "search"
iconName: "search"
enabled: searchEnabled
onClicked: search()
}
CustomComponents.ToolButton {
icon: "save"
iconName: "save"
enabled: canBeSaved
onClicked: saveRequested()
}
CustomComponents.ToolButton {
icon: "contextual-menu"
iconName: "contextual-menu"
onClicked: menu.open()

Menu {
id: menu
y: parent.height
modal: true
CustomComponents.MenuItem {
icon: keyboardExtensionEnabled ? "select" : "select-none"
iconName: keyboardExtensionEnabled ? "select" : "select-none"
text: i18n.tr("Keyboard extension")
enabled: searchEnabled
onTriggered: keyboardExtensionToggled()
}
CustomComponents.MenuItem {
icon: "settings"
iconName: "settings"
text: i18n.tr("Settings")
onTriggered: settingsPageRequested()
}
CustomComponents.MenuItem {
icon: "info"
iconName: "info"
text: i18n.tr("About")
onTriggered: aboutPageRequested()
}
Expand Down
4 changes: 2 additions & 2 deletions ubports-seabass/qml/components/common/MenuItem.qml
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@ import '.' as CustomComponents

MenuItem {
id: root
property string icon
property string iconName
height: visible ? undefined : 0

contentItem: RowLayout {
anchors.fill: parent
anchors.leftMargin: Suru.units.gu(1)

CustomComponents.Icon {
name: root.icon
name: root.iconName
Layout.preferredWidth: Suru.units.gu(2)
Layout.preferredHeight: Suru.units.gu(2)
Layout.leftMargin: Suru.units.gu(1)
Expand Down
2 changes: 1 addition & 1 deletion ubports-seabass/qml/components/common/ToolBar.qml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ ToolBar {
anchors.fill: parent

CustomComponents.ToolButton {
icon: leadingIcon || "back"
iconName: leadingIcon || "back"
visible: hasLeadingButton
onClicked: leadingAction()
}
Expand Down
4 changes: 2 additions & 2 deletions ubports-seabass/qml/components/common/ToolButton.qml
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ import '.' as CustomComponents
ToolButton {
id: root
focusPolicy: Qt.NoFocus
property string icon
property string iconName

CustomComponents.Icon {
anchors.centerIn: parent
name: root.icon
name: root.iconName
}
}
6 changes: 3 additions & 3 deletions ubports-seabass/qml/components/files/DirectoryMenu.qml
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,17 @@ Menu {
signal deleteTriggered()

CustomComponents.MenuItem {
icon: "add"
iconName: "add"
text: i18n.tr("New file...")
onTriggered: createTriggered()
}
CustomComponents.MenuItem {
icon: "edit"
iconName: "edit"
text: i18n.tr("Rename...")
onTriggered: renameTriggered()
}
CustomComponents.MenuItem {
icon: "delete"
iconName: "delete"
text: i18n.tr("Delete")
onTriggered: deleteTriggered()
}
Expand Down
2 changes: 1 addition & 1 deletion ubports-seabass/qml/components/files/DotDotMenu.qml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Menu {
signal createTriggered()

CustomComponents.MenuItem {
icon: "add"
iconName: "add"
text: i18n.tr("New file...")
onTriggered: createTriggered()
}
Expand Down
4 changes: 2 additions & 2 deletions ubports-seabass/qml/components/files/FileMenu.qml
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@ Menu {
signal deleteTriggered()

CustomComponents.MenuItem {
icon: "edit"
iconName: "edit"
text: i18n.tr("Rename...")
onTriggered: renameTriggered()
}
CustomComponents.MenuItem {
icon: "delete"
iconName: "delete"
text: i18n.tr("Delete")
onTriggered: deleteTriggered()
}
Expand Down
12 changes: 6 additions & 6 deletions ubports-seabass/qml/components/files/Header.qml
Original file line number Diff line number Diff line change
Expand Up @@ -14,35 +14,35 @@ CustomComponents.ToolBar {
signal reloaded()

CustomComponents.ToolButton {
icon: "contextual-menu"
iconName: "contextual-menu"
onClicked: menu.open()

Menu {
id: menu
y: parent.height
modal: true
CustomComponents.MenuItem {
icon: "add"
iconName: "add"
text: i18n.tr("New file...")
onTriggered: fileCreationInitialized()
}
CustomComponents.MenuItem {
icon: "add"
iconName: "add"
text: i18n.tr("New project...")
onTriggered: projectCreationInitialized()
}
CustomComponents.MenuItem {
icon: treeMode ? "select" : "select-none"
iconName: treeMode ? "select" : "select-none"
text: i18n.tr("Tree mode")
onTriggered: treeMode = !treeMode
}
CustomComponents.MenuItem {
icon: "reload"
iconName: "reload"
text: i18n.tr("Reload")
onTriggered: reloaded()
}
CustomComponents.MenuItem {
icon: "close"
iconName: "close"
text: i18n.tr("Close")
onTriggered: closed()
visible: !hasLeadingButton
Expand Down
8 changes: 4 additions & 4 deletions ubports-seabass/qml/components/tabs/TabMenu.qml
Original file line number Diff line number Diff line change
Expand Up @@ -15,25 +15,25 @@ Menu {
signal closeToTheRight()

CustomComponents.MenuItem {
icon: "toolkit_arrow-left"
iconName: "toolkit_arrow-left"
text: i18n.tr("Move left")
onTriggered: moveLeft()
enabled: hasMoveLeft
}
CustomComponents.MenuItem {
icon: "toolkit_arrow-right"
iconName: "toolkit_arrow-right"
text: i18n.tr("Move right")
onTriggered: moveRight()
enabled: hasMoveRight
}
CustomComponents.MenuItem {
icon: "close"
iconName: "close"
text: i18n.tr("Close to the Right")
onTriggered: closeToTheRight()
enabled: hasMoveRight
}
CustomComponents.MenuItem {
icon: "close"
iconName: "close"
text: i18n.tr("Close All")
onTriggered: closeAll()
}
Expand Down

0 comments on commit 2f3786d

Please sign in to comment.