diff --git a/brmbar3/brmbar-gui-qt4/BarButton.qml b/brmbar3/brmbar-gui-qt4/BarButton.qml index 494b1a0..a3451fb 100644 --- a/brmbar3/brmbar-gui-qt4/BarButton.qml +++ b/brmbar3/brmbar-gui-qt4/BarButton.qml @@ -9,7 +9,7 @@ Rectangle { border.color: btnColor property string text: "Button" - property int fontSize: 60 + property int fontSize: 0.768 * 60 property variant btnColor: "#ffffff" signal buttonClick diff --git a/brmbar3/brmbar-gui-qt4/BarClock.qml b/brmbar3/brmbar-gui-qt4/BarClock.qml index 45ea69c..c348457 100644 --- a/brmbar3/brmbar-gui-qt4/BarClock.qml +++ b/brmbar3/brmbar-gui-qt4/BarClock.qml @@ -7,7 +7,7 @@ Rectangle { height: 65 property variant now: new Date() property variant textColor: "#000000" - property variant textSize: 16 + property variant textSize: 0.768 * 16 Timer { id: clockUpdater interval: 1000 // update clock every second diff --git a/brmbar3/brmbar-gui-qt4/BarKeyboard.qml b/brmbar3/brmbar-gui-qt4/BarKeyboard.qml index f0967b1..77fac0f 100644 --- a/brmbar3/brmbar-gui-qt4/BarKeyboard.qml +++ b/brmbar3/brmbar-gui-qt4/BarKeyboard.qml @@ -25,7 +25,7 @@ Grid { property bool special: key == "^" || key == "<" text: key == "^" ? "shift" : key == "<" ? "bksp" : key - fontSize: special ? 27 : 60 + fontSize: 0.768 * (special ? 27 : 60) onButtonClick: { if (key == "^") diff --git a/brmbar3/brmbar-gui-qt4/BarTextHint.qml b/brmbar3/brmbar-gui-qt4/BarTextHint.qml index dcb10fc..872a7bf 100644 --- a/brmbar3/brmbar-gui-qt4/BarTextHint.qml +++ b/brmbar3/brmbar-gui-qt4/BarTextHint.qml @@ -19,7 +19,7 @@ Item { anchors.bottomMargin: 0 anchors.top: parent.top anchors.topMargin: 0 - font.pixelSize: 60 + font.fontSize: 0.768 * 60 } Text { @@ -33,6 +33,6 @@ Item { anchors.topMargin: 0 anchors.right: parent.right anchors.rightMargin: 0 - transformOrigin: Item.Center; smooth: true; font.bold: false; wrapMode: Text.NoWrap; font.pixelSize: 60;horizontalAlignment: Text.AlignHCenter + transformOrigin: Item.Center; smooth: true; font.bold: false; wrapMode: Text.NoWrap; font.fontSize: 0.768 * 60;horizontalAlignment: Text.AlignHCenter } } diff --git a/brmbar3/brmbar-gui-qt4/BarcodeInput.qml b/brmbar3/brmbar-gui-qt4/BarcodeInput.qml index 908902e..d36e0f0 100644 --- a/brmbar3/brmbar-gui-qt4/BarcodeInput.qml +++ b/brmbar3/brmbar-gui-qt4/BarcodeInput.qml @@ -12,7 +12,7 @@ TextInput { transformOrigin: Item.Center visible: true opacity: 0 - font.pixelSize: 12 + font.fontSize: 0.768 * 12 focus: true validator: RegExpValidator { regExp: /..*/ } /* non-empty strings; barcode readers send empty lines, ignore these */ } diff --git a/brmbar3/brmbar-gui-qt4/BasePage.qml b/brmbar3/brmbar-gui-qt4/BasePage.qml index 02e0b7a..5de93db 100644 --- a/brmbar3/brmbar-gui-qt4/BasePage.qml +++ b/brmbar3/brmbar-gui-qt4/BasePage.qml @@ -12,7 +12,7 @@ Rectangle { y: 35 color: "#71cccc" text: "brmbar v3" - font.pixelSize: 49 + font.fontSize: 0.768 * 49 } BarClock { id: clock @@ -20,7 +20,7 @@ Rectangle { y: 35 color: "#000000" textColor: "#71cccc" - textSize: 49 + textSize: 0.768 * 49 } Image { @@ -43,7 +43,7 @@ Rectangle { text: "" horizontalAlignment: Text.AlignHCenter //anchors.horizontalCenter: clock.horizontalCenter - font.pixelSize: 49 + font.fontSize: 0.768 * 49 state: "HIDDEN" opacity: 0 diff --git a/brmbar3/brmbar-gui-qt4/ChargeCredit.qml b/brmbar3/brmbar-gui-qt4/ChargeCredit.qml index a65a241..11a9aec 100644 --- a/brmbar3/brmbar-gui-qt4/ChargeCredit.qml +++ b/brmbar3/brmbar-gui-qt4/ChargeCredit.qml @@ -21,7 +21,7 @@ Item { wrapMode: Text.WordWrap horizontalAlignment: Text.AlignRight verticalAlignment: Text.AlignVCenter - font.pixelSize: 60 + font.fontSize: 0.768 * 60 } Text { @@ -34,7 +34,7 @@ Item { text: parent.amount horizontalAlignment: Text.AlignRight verticalAlignment: Text.AlignVCenter - font.pixelSize: 122 + font.fontSize: 0.768 * 122 } BarTextHint { @@ -82,7 +82,7 @@ Item { y: 582 width: 360 text: "Charge" - fontSize: 60 + fontSize: 0.768 * 60 visible: parent.amount && parent.userdbid onButtonClick: { parent.chargeCredit() diff --git a/brmbar3/brmbar-gui-qt4/ItemEdit.qml b/brmbar3/brmbar-gui-qt4/ItemEdit.qml index bcb8d82..33b8358 100644 --- a/brmbar3/brmbar-gui-qt4/ItemEdit.qml +++ b/brmbar3/brmbar-gui-qt4/ItemEdit.qml @@ -55,7 +55,7 @@ Item { text: page.item_name wrapMode: Text.WordWrap verticalAlignment: Text.AlignVCenter - font.pixelSize: 46 + font.fontSize: 0.768 * 46 } BarButton { @@ -64,7 +64,7 @@ Item { y: 0 width: 240 height: 60 - fontSize: 46 + fontSize: 0.768 * 46 text: page.state == "name_edit" ? "Assign" : "Edit" onButtonClick: { if (page.state == "name_edit") page.state = "normal"; else page.state = "name_edit"; } } @@ -97,7 +97,7 @@ Item { color: "#ffffff" text: "Buy price:" verticalAlignment: Text.AlignVCenter - font.pixelSize: 46 + font.fontSize: 0.768 * 46 } Text { @@ -110,7 +110,7 @@ Item { text: page.buy_price horizontalAlignment: Text.AlignRight verticalAlignment: Text.AlignVCenter - font.pixelSize: 46 + font.fontSize: 0.768 * 46 } BarButton { @@ -119,7 +119,7 @@ Item { y: 0 width: 240 height: 60 - fontSize: 46 + fontSize: 0.768 * 46 text: page.state == "buyprice_edit" ? "Assign" : "Edit" onButtonClick: { if (page.state == "buyprice_edit") page.state = "normal"; else page.state = "buyprice_edit"; } } @@ -152,7 +152,7 @@ Item { color: "#ffffff" text: "Sell price:" verticalAlignment: Text.AlignVCenter - font.pixelSize: 46 + font.fontSize: 0.768 * 46 } Text { @@ -165,7 +165,7 @@ Item { text: page.price horizontalAlignment: Text.AlignRight verticalAlignment: Text.AlignVCenter - font.pixelSize: 46 + font.fontSize: 0.768 * 46 } BarButton { @@ -174,7 +174,7 @@ Item { y: 0 width: 240 height: 60 - fontSize: 46 + fontSize: 0.768 * 46 text: page.state == "sellprice_edit" ? "Assign" : "Edit" onButtonClick: { if (page.state == "sellprice_edit") page.state = "normal"; else page.state = "sellprice_edit"; } } @@ -207,7 +207,7 @@ Item { color: "#ffffff" text: "Quantity:" verticalAlignment: Text.AlignVCenter - font.pixelSize: 46 + font.fontSize: 0.768 * 46 } Text { @@ -220,7 +220,7 @@ Item { text: info.balance horizontalAlignment: Text.AlignRight verticalAlignment: Text.AlignVCenter - font.pixelSize: 46 + font.fontSize: 0.768 * 46 } BarButton { @@ -229,7 +229,7 @@ Item { y: 0 width: 240 height: 60 - fontSize: 46 + fontSize: 0.768 * 46 text: page.state == "balance_edit" ? "Add qty" : "Restock" onButtonClick: { if (page.state == "balance_edit") { @@ -267,7 +267,7 @@ Item { color: "#ffffff" text: "Add quantity:" verticalAlignment: Text.AlignVCenter - font.pixelSize: 46 + font.fontSize: 0.768 * 46 } Text { @@ -279,7 +279,7 @@ Item { color: "#ffff7c" text: balance_addqty_edit.enteredText verticalAlignment: Text.AlignVCenter - font.pixelSize: 60 + font.fontSize: 0.768 * 60 } Text { @@ -290,7 +290,7 @@ Item { width: 248 color: "#71cccc" text: "Please specify the precise amount of newly\nstocked goods, even if the current quantity\nvalue does not match reality (you can let us\nknow about that at brmbar@brmlab.cz)" - font.pixelSize: 27 + font.fontSize: 0.768 * 27 } } diff --git a/brmbar3/brmbar-gui-qt4/ItemInfo.qml b/brmbar3/brmbar-gui-qt4/ItemInfo.qml index 9ab7906..9a88b4e 100644 --- a/brmbar3/brmbar-gui-qt4/ItemInfo.qml +++ b/brmbar3/brmbar-gui-qt4/ItemInfo.qml @@ -20,7 +20,7 @@ Item { text: parent.name wrapMode: Text.WordWrap verticalAlignment: Text.AlignVCenter - font.pixelSize: 60 + font.fontSize: 0.768 * 60 } Text { @@ -33,7 +33,7 @@ Item { text: parent.price horizontalAlignment: Text.AlignRight verticalAlignment: Text.AlignVCenter - font.pixelSize: 122 + font.fontSize: 0.768 * 122 } BarTextHint { @@ -68,7 +68,7 @@ Item { y: 582 width: 360 text: "Pay by cash" - fontSize: 60 + fontSize: 0.768 * 60 onButtonClick: { shop.sellItemCash(dbid) status_text.setStatus("Sold! Put " + price + " Kč in the money box.", "#ffff7c") diff --git a/brmbar3/brmbar-gui-qt4/MainPage.qml b/brmbar3/brmbar-gui-qt4/MainPage.qml index e17571a..cb4f980 100644 --- a/brmbar3/brmbar-gui-qt4/MainPage.qml +++ b/brmbar3/brmbar-gui-qt4/MainPage.qml @@ -31,7 +31,7 @@ Item { y: 430 width: 360 text: "Select Item" - fontSize: 60 + fontSize: 0.768 * 60 btnColor: "#666666" } diff --git a/brmbar3/brmbar-gui-qt4/Management.qml b/brmbar3/brmbar-gui-qt4/Management.qml index 068b74a..690e713 100644 --- a/brmbar3/brmbar-gui-qt4/Management.qml +++ b/brmbar3/brmbar-gui-qt4/Management.qml @@ -21,7 +21,7 @@ Item { text: "Profit:" wrapMode: Text.WordWrap verticalAlignment: Text.AlignVCenter - font.pixelSize: 46 + font.fontSize: 0.768 * 46 } Text { @@ -34,7 +34,7 @@ Item { text: parent.profit verticalAlignment: Text.AlignVCenter horizontalAlignment: Text.AlignRight - font.pixelSize: 46 + font.fontSize: 0.768 * 46 } Text { @@ -47,7 +47,7 @@ Item { text: "Cash:" wrapMode: Text.WordWrap verticalAlignment: Text.AlignVCenter - font.pixelSize: 46 + font.fontSize: 0.768 * 46 } Text { @@ -60,7 +60,7 @@ Item { text: parent.cash verticalAlignment: Text.AlignVCenter horizontalAlignment: Text.AlignRight - font.pixelSize: 46 + font.fontSize: 0.768 * 46 } Text { @@ -73,7 +73,7 @@ Item { text: "Credit:" wrapMode: Text.WordWrap verticalAlignment: Text.AlignVCenter - font.pixelSize: 46 + font.fontSize: 0.768 * 46 } Text { @@ -86,7 +86,7 @@ Item { text: parent.credit_money verticalAlignment: Text.AlignVCenter horizontalAlignment: Text.AlignRight - font.pixelSize: 46 + font.fontSize: 0.768 * 46 } Text { @@ -99,7 +99,7 @@ Item { text: "Stock:" wrapMode: Text.WordWrap verticalAlignment: Text.AlignVCenter - font.pixelSize: 46 + font.fontSize: 0.768 * 46 } Text { @@ -112,7 +112,7 @@ Item { text: parent.inv_money verticalAlignment: Text.AlignVCenter horizontalAlignment: Text.AlignRight - font.pixelSize: 46 + font.fontSize: 0.768 * 46 } BarButton { diff --git a/brmbar3/brmbar-gui-qt4/Receipt.qml b/brmbar3/brmbar-gui-qt4/Receipt.qml index 905b68e..73801f2 100644 --- a/brmbar3/brmbar-gui-qt4/Receipt.qml +++ b/brmbar3/brmbar-gui-qt4/Receipt.qml @@ -44,7 +44,7 @@ Item { text: page.description wrapMode: Text.WordWrap verticalAlignment: Text.AlignVCenter - font.pixelSize: 46 + font.fontSize: 0.768 * 46 } BarButton { @@ -53,7 +53,7 @@ Item { y: 0 width: 300 height: 60 - fontSize: 46 + fontSize: 0.768 * 46 text: page.state == "description_edit" ? "Assign" : "Description" onButtonClick: { if (page.state == "description_edit") page.state = "normal"; else page.state = "description_edit"; } } @@ -86,7 +86,7 @@ Item { color: "#ffffff" text: "Money Amount:" verticalAlignment: Text.AlignVCenter - font.pixelSize: 46 + font.fontSize: 0.768 * 46 } Text { @@ -99,7 +99,7 @@ Item { text: amount horizontalAlignment: Text.AlignRight verticalAlignment: Text.AlignVCenter - font.pixelSize: 46 + font.fontSize: 0.768 * 46 } BarButton { @@ -108,7 +108,7 @@ Item { y: 0 width: 240 height: 60 - fontSize: 46 + fontSize: 0.768 * 46 text: page.state == "amount_edit" ? "Assign" : "Edit" onButtonClick: { if (page.state == "amount_edit") page.state = "normal"; else page.state = "amount_edit"; } } @@ -144,7 +144,7 @@ Item { text: "This is for cashing in small brmlab expenses.\nWrite the current date on the receipt and put it to the money box.\nDo not forget to announce this on a meetup and add it to the [[newz]].\nFor restocking brmbar items, please go to the Management view instead." wrapMode: Text.WordWrap horizontalAlignment: Text.AlignHCenter - font.pixelSize: 27 + font.fontSize: 0.768 * 27 } BarButton { diff --git a/brmbar3/brmbar-gui-qt4/StockMgmt.qml b/brmbar3/brmbar-gui-qt4/StockMgmt.qml index 0fa09c5..09f45bb 100644 --- a/brmbar3/brmbar-gui-qt4/StockMgmt.qml +++ b/brmbar3/brmbar-gui-qt4/StockMgmt.qml @@ -44,7 +44,7 @@ Item { text: modelData.name anchors.verticalCenter: parent.verticalCenter color: "#ffffff" - font.pixelSize: 46 + font.fontSize: 0.768 * 46 } Text { @@ -54,7 +54,7 @@ Item { color: "#ffff7c" text: modelData.price horizontalAlignment: Text.AlignRight - font.pixelSize: 46 + font.fontSize: 0.768 * 46 } BarButton { @@ -63,7 +63,7 @@ Item { width: 240 height: 68 text: "Edit" - fontSize: 46 + fontSize: 0.768 * 46 onButtonClick: { loadPage("ItemEdit", { dbid: modelData.id }) } @@ -86,7 +86,7 @@ Item { y: 582 width: 360 text: "Add Item" - fontSize: 60 + fontSize: 0.768 * 60 onButtonClick: { loadPage("ItemEdit", { dbid: "" }) } diff --git a/brmbar3/brmbar-gui-qt4/UserInfo.qml b/brmbar3/brmbar-gui-qt4/UserInfo.qml index be74e17..21fab13 100644 --- a/brmbar3/brmbar-gui-qt4/UserInfo.qml +++ b/brmbar3/brmbar-gui-qt4/UserInfo.qml @@ -19,7 +19,7 @@ Item { text: parent.name wrapMode: Text.WordWrap verticalAlignment: Text.AlignVCenter - font.pixelSize: 60 + font.fontSize: 0.768 * 60 } Text { @@ -32,7 +32,7 @@ Item { text: parent.negbalance horizontalAlignment: Text.AlignRight verticalAlignment: Text.AlignVCenter - font.pixelSize: 122 + font.fontSize: 0.768 * 122 } BarcodeInput { @@ -58,7 +58,7 @@ Item { y: 582 width: 360 text: "Charge" - fontSize: 60 + fontSize: 0.768 * 60 onButtonClick: { loadPage("ChargeCredit", { "username": name, "userdbid": dbid }) } diff --git a/brmbar3/brmbar-gui-qt4/UserMgmt.qml b/brmbar3/brmbar-gui-qt4/UserMgmt.qml index 27421c3..43ea684 100644 --- a/brmbar3/brmbar-gui-qt4/UserMgmt.qml +++ b/brmbar3/brmbar-gui-qt4/UserMgmt.qml @@ -45,7 +45,7 @@ Item { text: modelData.name anchors.verticalCenter: parent.verticalCenter color: "#ffffff" - font.pixelSize: 46 + font.fontSize: 0.768 * 46 } Text { @@ -55,7 +55,7 @@ Item { color: "#ffff7c" text: modelData.negbalance_str horizontalAlignment: Text.AlignRight - font.pixelSize: 46 + font.fontSize: 0.768 * 46 } BarButton { @@ -64,7 +64,7 @@ Item { width: 240 height: 68 text: "Withdraw" - fontSize: 46 + fontSize: 0.768 * 46 onButtonClick: { loadPage("Withdraw", { username: modelData.name, userdbid: modelData.id }) } @@ -87,7 +87,7 @@ Item { y: 582 width: 360 text: "Add User" - fontSize: 60 + fontSize: 0.768 * 60 btnColor: "#666666" } diff --git a/brmbar3/brmbar-gui-qt4/Withdraw.qml b/brmbar3/brmbar-gui-qt4/Withdraw.qml index 2baa6f2..ef814ac 100644 --- a/brmbar3/brmbar-gui-qt4/Withdraw.qml +++ b/brmbar3/brmbar-gui-qt4/Withdraw.qml @@ -21,7 +21,7 @@ Item { wrapMode: Text.WordWrap horizontalAlignment: Text.AlignRight verticalAlignment: Text.AlignVCenter - font.pixelSize: 60 + font.fontSize: 0.768 * 60 } Text { @@ -34,7 +34,7 @@ Item { text: parent.amount ? "-" + parent.amount : "" horizontalAlignment: Text.AlignRight verticalAlignment: Text.AlignVCenter - font.pixelSize: 122 + font.fontSize: 0.768 * 122 } BarTextHint { @@ -82,7 +82,7 @@ Item { y: 582 width: 360 text: "Withdraw" - fontSize: 60 + fontSize: 0.768 * 60 visible: parent.amount && parent.userdbid onButtonClick: { parent.withdrawCredit()