Коммит a48fcf1b создал по автору Konstantin Hvorov's avatar Konstantin Hvorov Зафиксировано автором Alexey Andreev
Просмотр файлов

[AppBar] Update AppBar example page. #29

владелец cb701f62
......@@ -43,7 +43,7 @@ Page {
width: parent.width - 2 * Theme.horizontalPageMargin
spacing: Theme.paddingSmall
// Move content under appbar
// Move content under AppBar
Item {
width: 1
height: appBar.appBarHeight + Theme.paddingLarge
......@@ -62,16 +62,16 @@ Page {
}
Button {
onClicked: appBar._openStatus = !appBar._openStatus
onClicked: appBar.opened ? appBar.close() : appBar.open()
anchors.horizontalCenter: parent.horizontalCenter
preferredWidth: Theme.buttonWidthSmall * 1.5
text: (appBar._openStatus ?
//% "Hide"
qsTrId("ui-component-gallery-appbar-hide") :
text: (appBar.opened ?
//% "Close"
qsTrId("ui-component-gallery-appbar-close") :
//% "Open"
qsTrId("ui-component-gallery-appbar-open")) +
//% " appbar"
//% " AppBar"
qsTrId("ui-component-gallery-appbar-appbar-suffix")
}
......@@ -84,9 +84,9 @@ Page {
preferredWidth: Theme.buttonWidthSmall * 1.5
//% "Header text: "
text: qsTrId("ui-component-gallery-appbar-header-text") + (appBar.headerText === "" ?
//% "Show"
//% "show"
qsTrId("ui-component-gallery-appbar-show") :
//% "Hide"
//% "hide"
qsTrId("ui-component-gallery-appbar-hide"))
}
......@@ -97,9 +97,9 @@ Page {
preferredWidth: Theme.buttonWidthSmall * 1.5
//% "SubHeader text: "
text: qsTrId("ui-component-gallery-appbar-subheader-text") + (appBar.subHeaderText === "" ?
//% "Show"
//% "show"
qsTrId("ui-component-gallery-appbar-show") :
//% "Hide"
//% "hide"
qsTrId("ui-component-gallery-appbar-hide"))
}
......@@ -110,9 +110,9 @@ Page {
preferredWidth: Theme.buttonWidthSmall * 1.5
//% "Header box: "
text: qsTrId("ui-component-gallery-appbar-header-box") + (appBar._headerHide ?
//% "Show"
//% "show"
qsTrId("ui-component-gallery-appbar-show") :
//% "Hide"
//% "hide"
qsTrId("ui-component-gallery-appbar-hide"))
}
......@@ -158,10 +158,10 @@ Page {
id: appBar
AppBarButton {
//% "Hide bottom bar"
property string context: qsTrId("ui-component-gallery-appbar-hide-bottom-bar")
//% "Close bottom bar"
property string context: qsTrId("ui-component-gallery-appbar-close-bottom-bar")
onClicked: toolBar.hide()
onClicked: toolBar.close()
icon.source: "image://theme/icon-m-gps"
}
......@@ -200,9 +200,9 @@ Page {
anchors.horizontalCenter: parent.horizontalCenter
//% "Header"
text: qsTrId("ui-component-gallery-appbar-header") + (appBar.headerText === "" ?
//% "Show"
//% "show"
qsTrId("ui-component-gallery-appbar-show") :
//% "Hide"
//% "hide"
qsTrId("ui-component-gallery-appbar-hide"))
}
......@@ -221,28 +221,28 @@ Page {
}
Button {
onClicked: appBar._openStatus ? appBar.hide() : appBar.open()
onClicked: appBar.opened ? appBar.close() : appBar.open()
anchors.horizontalCenter: parent.horizontalCenter
text: (appBar._openStatus ?
//% "Hide"
qsTrId("ui-component-gallery-appbar-hide") :
text: (appBar.opened ?
//% "Close"
qsTrId("ui-component-gallery-appbar-close") :
//% "Open"
qsTrId("ui-component-gallery-appbar-open")) +
//% " appbar"
//% " AppBar"
qsTrId("ui-component-gallery-appbar-appbar-suffix")
}
Button {
onClicked: toolBar._openStatus ? toolBar.hide() : toolBar.open()
onClicked: toolBar.opened ? toolBar.close() : toolBar.open()
anchors.horizontalCenter: parent.horizontalCenter
text: (toolBar._openStatus ?
//% "Hide"
qsTrId("ui-component-gallery-appbar-hide") :
text: (toolBar.opened ?
//% "Close"
qsTrId("ui-component-gallery-appbar-close") :
//% "Open"
qsTrId("ui-component-gallery-appbar-open")) +
//% " toolbar"
//% " ToolBar"
qsTrId("ui-component-gallery-appbar-toolbar-suffix")
}
......@@ -263,10 +263,10 @@ Page {
}
AppBarButton {
onClicked: toolBar.hide()
onClicked: toolBar.close()
//% "Hide"
text: qsTrId("ui-component-gallery-appbar-hide")
//% "Close ToolBar"
text: qsTrId("ui-component-gallery-appbar-close-toolbar")
icon.source: "image://theme/icon-m-gps"
}
......
......@@ -3579,16 +3579,18 @@
<translation>Монохром</translation>
</message>
<message id="ui-component-gallery-appbar-hide">
<source>Hide</source>
<translation>Скрыть</translation>
<source>hide</source>
<oldsource>Hide</oldsource>
<translation>скрыть</translation>
</message>
<message id="ui-component-gallery-appbar-open">
<source>Open</source>
<translation>Открыть</translation>
</message>
<message id="ui-component-gallery-appbar-appbar-suffix">
<source> appbar</source>
<translation> appbar</translation>
<source> AppBar</source>
<oldsource> appbar</oldsource>
<translation> Appbar</translation>
</message>
<message id="ui-component-gallery-appbar-header">
<source>Header</source>
......@@ -3599,8 +3601,9 @@
<translation>Текст заголовка: </translation>
</message>
<message id="ui-component-gallery-appbar-show">
<source>Show</source>
<translation>Показать</translation>
<source>show</source>
<oldsource>Show</oldsource>
<translation>показать</translation>
</message>
<message id="ui-component-gallery-appbar-subheader-text">
<source>SubHeader text: </source>
......@@ -3618,17 +3621,14 @@
<source>Bottom positioned AppBar</source>
<translation>AppBar: позиционирование снизу</translation>
</message>
<message id="ui-component-gallery-appbar-hide-bottom-bar">
<source>Hide bottom bar</source>
<translation>Скрыть нижнее меню</translation>
</message>
<message id="ui-component-gallery-appbar-textbutton">
<source>TextButton</source>
<translation>Кнопка с текстом</translation>
</message>
<message id="ui-component-gallery-appbar-toolbar-suffix">
<source> toolbar</source>
<translation> тулбар</translation>
<source> ToolBar</source>
<oldsource> toolbar</oldsource>
<translation> Тулбар</translation>
</message>
<message id="ui-component-gallery-appbar-example">
<source>Example</source>
......@@ -4042,5 +4042,17 @@
<source>Hello 4</source>
<translation>Привет 4</translation>
</message>
<message id="ui-component-gallery-appbar-close">
<source>Close</source>
<translation>Закрыть</translation>
</message>
<message id="ui-component-gallery-appbar-close-bottom-bar">
<source>Close bottom bar</source>
<translation>Закрыть нижнюю панель</translation>
</message>
<message id="ui-component-gallery-appbar-close-toolbar">
<source>Close ToolBar</source>
<translation>Закрыть тулбар</translation>
</message>
</context>
</TS>
......@@ -3579,16 +3579,18 @@
<translation>Monochrome</translation>
</message>
<message id="ui-component-gallery-appbar-hide">
<source>Hide</source>
<translation>Hide</translation>
<source>hide</source>
<oldsource>Hide</oldsource>
<translation>hide</translation>
</message>
<message id="ui-component-gallery-appbar-open">
<source>Open</source>
<translation>Open</translation>
</message>
<message id="ui-component-gallery-appbar-appbar-suffix">
<source> appbar</source>
<translation> appbar</translation>
<source> AppBar</source>
<oldsource> appbar</oldsource>
<translation> AppBar</translation>
</message>
<message id="ui-component-gallery-appbar-header">
<source>Header</source>
......@@ -3599,8 +3601,9 @@
<translation>Header text: </translation>
</message>
<message id="ui-component-gallery-appbar-show">
<source>Show</source>
<translation>Show</translation>
<source>show</source>
<oldsource>Show</oldsource>
<translation>show</translation>
</message>
<message id="ui-component-gallery-appbar-subheader-text">
<source>SubHeader text: </source>
......@@ -3618,17 +3621,14 @@
<source>Bottom positioned AppBar</source>
<translation>Bottom positioned AppBar</translation>
</message>
<message id="ui-component-gallery-appbar-hide-bottom-bar">
<source>Hide bottom bar</source>
<translation>Hide bottom bar</translation>
</message>
<message id="ui-component-gallery-appbar-textbutton">
<source>TextButton</source>
<translation>TextButton</translation>
</message>
<message id="ui-component-gallery-appbar-toolbar-suffix">
<source> toolbar</source>
<translation> toolbar</translation>
<source> ToolBar</source>
<oldsource> toolbar</oldsource>
<translation> ToolBar</translation>
</message>
<message id="ui-component-gallery-appbar-example">
<source>Example</source>
......@@ -4042,5 +4042,17 @@
<source>Hello 4</source>
<translation>Hello 4</translation>
</message>
<message id="ui-component-gallery-appbar-close">
<source>Close</source>
<translation>Close</translation>
</message>
<message id="ui-component-gallery-appbar-close-bottom-bar">
<source>Close bottom bar</source>
<translation>Close bottom bar</translation>
</message>
<message id="ui-component-gallery-appbar-close-toolbar">
<source>Close ToolBar</source>
<translation>Close ToolBar</translation>
</message>
</context>
</TS>
Поддерживает Markdown
0% или .
You are about to add 0 people to the discussion. Proceed with caution.
Сначала завершите редактирование этого сообщения!
Пожалуйста, зарегистрируйтесь или чтобы прокомментировать