From e80fe5ea630453fc455d161e15f72f4fd46b7272 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mikko=20Syrj=C3=A4?= Date: Wed, 6 Mar 2019 02:47:32 +0200 Subject: Added some new button images. --- Editor.qml | 3 +- image/exit_icon&48.png | Bin 0 -> 3797 bytes image/eye_icon&48.png | Bin 4153 -> 3876 bytes image/grid_icon&48.png | Bin 0 -> 3616 bytes image/info_icon&48.png | Bin 0 -> 3812 bytes image/zoom_icon&48.png | Bin 0 -> 3999 bytes locale/symedit.en_GB.ts | 170 +++++++++++++++++++++++++----------------------- locale/symedit.fi_FI.ts | 170 +++++++++++++++++++++++++----------------------- locale/symedit.ts | 24 ++++--- main.qml | 17 ++++- qml.qrc | 4 ++ 11 files changed, 210 insertions(+), 178 deletions(-) create mode 100644 image/exit_icon&48.png create mode 100644 image/grid_icon&48.png create mode 100644 image/info_icon&48.png create mode 100644 image/zoom_icon&48.png diff --git a/Editor.qml b/Editor.qml index 289966a..67db735 100644 --- a/Editor.qml +++ b/Editor.qml @@ -76,6 +76,7 @@ Rectangle startx = mousex starty = mousey manager.setActiveIndex(-1); + focus = true down = true } @@ -210,7 +211,7 @@ Rectangle function painttext(context, string, point, active) { context.lineWidth = textsize * (preview ? zoommin : zoomscale) / 2 - var fontsize = 20 * textsize * (preview ? zoommin : zoomscale) + var fontsize = 30 * textsize * (preview ? zoommin : zoomscale) context.font = fontsize.toString() + "px sans-serif" var position = Qt.point((point.x + max + offsetx) * scalexy, (max - point.y + offsety) * scalexy) context.fillText(string, position.x, position.y) diff --git a/image/exit_icon&48.png b/image/exit_icon&48.png new file mode 100644 index 0000000..c380907 Binary files /dev/null and b/image/exit_icon&48.png differ diff --git a/image/eye_icon&48.png b/image/eye_icon&48.png index 3e784aa..c5bcf57 100644 Binary files a/image/eye_icon&48.png and b/image/eye_icon&48.png differ diff --git a/image/grid_icon&48.png b/image/grid_icon&48.png new file mode 100644 index 0000000..00e0d19 Binary files /dev/null and b/image/grid_icon&48.png differ diff --git a/image/info_icon&48.png b/image/info_icon&48.png new file mode 100644 index 0000000..071cb87 Binary files /dev/null and b/image/info_icon&48.png differ diff --git a/image/zoom_icon&48.png b/image/zoom_icon&48.png new file mode 100644 index 0000000..9d9e881 Binary files /dev/null and b/image/zoom_icon&48.png differ diff --git a/locale/symedit.en_GB.ts b/locale/symedit.en_GB.ts index db98360..eaa7a7d 100644 --- a/locale/symedit.en_GB.ts +++ b/locale/symedit.en_GB.ts @@ -5,315 +5,319 @@ - Symbol Editor + Symbol Editor - File + File - Open... + Open... - Save... + Save... - Exit + Exit - Edit + Edit - Undo + Undo - Redo + Redo - Cut + Cut - Copy + Copy - Paste + Paste - Rotate Right + Rotate Right - Rotate Left + Rotate Left - Raise Item + Raise Item - Lower Item + Lower Item - Delete Item + Delete Item - View + View - Zoom In + Zoom In - Zoom Out + Zoom Out - Zoom Out + Maximum - Show Grid + Show Grid - Preview + Preview - Tool + Tool - Select + Select - Line + Line - Rectangle Corner + Rectangle Corner - Rectangle Center + Rectangle Center - Circle Corner + Circle Corner - Circle Radius + Circle Radius - Circle Center + Circle Center - Semicircle + Semicircle - Quarter Circle + Quarter Circle - Text + Text - Help + Help - + - Contents + Contents - + - About + About - Undo edit + Undo edit - Redo edit + Redo edit - Cut symbol + Cut symbol - + - Copy symbol + Copy symbol - Paste symbol + Paste symbol - Rotate right + Rotate right - Rotate left + Rotate left - Raise item + Raise item - Lower item + Lower item - + - Delete item + Delete item - + + + Maximum zoom + + - Preview symbol + Preview symbol - Select item + Select item - Draw line + Draw line - Rectangle corner + Rectangle corner - Rectangle center + Rectangle center - Circle corner + Circle corner - Circle radius + Circle radius - Circle center + Circle center - Draw text + Draw text - Snap Grid + Snap Grid - Fill Item + Fill Item - 0 No fill + 0 No fill - 1 Background + 1 Background - 2 Fill area + 2 Fill area - Line Width + Line Width - Text Size + Text Size - Alignment + Alignment - 1 Top right + 1 Top right - 2 Top center + 2 Top center - 3 Top left + 3 Top left - 4 Base right + 4 Base right - 5 Base center + 5 Base center - 6 Base left + 6 Base left - 7 Bottom right + 7 Bottom right - 8 Bottom center + 8 Bottom center - 9 Bottom left + 9 Bottom left - 10 Middle right + 10 Middle right - 11 Middle center + 11 Middle center - 12 Middle left + 12 Middle left - Text + Text - About Program + About Program - Symbol editor for 3D-Win + Symbol editor for 3D-Win diff --git a/locale/symedit.fi_FI.ts b/locale/symedit.fi_FI.ts index 8aeb8b7..23cd14d 100644 --- a/locale/symedit.fi_FI.ts +++ b/locale/symedit.fi_FI.ts @@ -5,315 +5,319 @@ - Symbolieditori + Symbolieditori - Tiedosto + Tiedosto - Avaa... + Avaa... - Tallenna... + Tallenna... - Lopeta + Lopeta - Muokkaa + Muokkaa - Kumoa + Kumoa - Tee uudelleen + Tee uudelleen - Leikkaa + Leikkaa - Kopioi + Kopioi - Liitä + Liitä - Käännä oikealle + Käännä oikealle - Käännä vasemmalle + Käännä vasemmalle - Nosta kohdetta + Nosta kohdetta - Alenna kohdetta + Alenna kohdetta - Poista kohde + Poista kohde - Näytä + Näytä - Lähennä + Lähennä - Loitonna + Loitonna - Kaikki + Maksimi - Näytä ruudukko + Ruudukko - Esikatselu + Esikatselu - Työkalut + Työkalut - Valitse + Valitse - Viiva + Viiva - Suorakulmio kulmista + Suorakulmio kulmista - Suorakulmio keskeltä + Suorakulmio keskeltä - Ympyrä kulmista + Ympyrä kulmista - Ympyrä halkaisija + Ympyrä halkaisija - Ympyrä keskeltä + Ympyrä keskeltä - Puoliympyrä + Puoliympyrä - Neljännesympyrä + Neljännesympyrä - Teksti + Teksti - Ohje + Ohje - + - Sisältö + Sisältö - + - Tietoja + Tietoja - Kumoa toiminto + Kumoa toiminto - Tee toiminto uudelleen + Tee toiminto uudelleen - Leikkaa symboli + Leikkaa symboli - + - Kopioi symboli + Kopioi symboli - Liitä symboli + Liitä symboli - Käännä oikealle + Käännä oikealle - Käännä vasemmalle + Käännä vasemmalle - Nosta kohdetta + Nosta kohdetta - Alenna kohdetta + Alenna kohdetta - + - Poista kohde + Poista kohde - + + + Maksimizoomaus + + - Symbolin esikatselu + Symbolin esikatselu - Valitse kohde + Valitse kohde - Piirrä viiva + Piirrä viiva - Suorakulmio kulmista + Suorakulmio kulmista - Suorakulmio keskeltä + Suorakulmio keskeltä - Ympyrä kulmista + Ympyrä kulmista - Ympyrä halkasija + Ympyrä halkasija - Ympyrä keskeltä + Ympyrä keskeltä - Piirrä teksti + Piirrä teksti - Tartu + Tartunta - Täyttö + Täyttö - 0 Ei täyttöä + 0 Ei täyttöä - 1 Taustaväri + 1 Taustaväri - 2 Alueen täyttö + 2 Alueen täyttö - Viivan leveys + Viivan leveys - Tekstin koko + Tekstin koko - Asemointi + Asemointi - 1 Ylhäällä oikealla + 1 Ylhäällä oikealla - 2 Ylhäällä keskellä + 2 Ylhäällä keskellä - 3 Ylhäällä vasemmalla + 3 Ylhäällä vasemmalla - 4 Alareunassa oikealla + 4 Alareunassa oikealla - 5 Alareunassa keskellä + 5 Alareunassa keskellä - 6 Alareunassa vasemmalla + 6 Alareunassa vasemmalla - 7 Alhaalla oikealla + 7 Alhaalla oikealla - 8 Alhaalla keskellä + 8 Alhaalla keskellä - 9 Alhaalla vasemmalla + 9 Alhaalla vasemmalla - 10 Puolivälissä oikealla + 10 Puolivälissä oikealla - 11 Puolivälissä keskellä + 11 Puolivälissä keskellä - 12 Puolivälissä vasemmalla + 12 Puolivälissä vasemmalla - Teksti + Teksti - Tietoja ohjelmasta + Tietoja ohjelmasta - 3D-Win symbolieditori + 3D-Win symbolieditori diff --git a/locale/symedit.ts b/locale/symedit.ts index 37f1fca..8289a60 100644 --- a/locale/symedit.ts +++ b/locale/symedit.ts @@ -135,14 +135,6 @@ - - - - - - - - @@ -155,7 +147,7 @@ - + @@ -179,7 +171,7 @@ - + @@ -315,5 +307,17 @@ + + + + + + + + + + + + diff --git a/main.qml b/main.qml index f68eb48..2cc5cd7 100644 --- a/main.qml +++ b/main.qml @@ -132,7 +132,19 @@ ApplicationWindow BarSeparator { } // BarTool { image: "image/plus_icon&48.png"; tooltip: qsTrId("id_tooltip_zoom_in"); onClicked: zoom(1) } // BarTool { image: "image/minus_icon&48.png"; tooltip: qsTrId("id_tooltip_zoom_out"); onClicked: zoom(-1) } - BarTool { image: "image/eye_icon&48.png"; tooltip: qsTrId("id_tooltip_zoom_preview"); onClicked: previewsymbol() } + BarTool { image: "image/zoom_icon&48.png"; tooltip: qsTrId("id_tooltip_zoom_all"); onClicked: zoom(0) } + BarTool + { + image: "image/eye_icon&48.png"; + tooltip: qsTrId("id_tooltip_zoom_preview"); + checkable: true + checked: preview + onClicked: + { + previewsymbol() // clicking button seems to break binding + checked = Qt.binding(function() { return preview }) + } + } BarSeparator { } BarTool { image: "image/cursor_icon&48.png"; tooltip: qsTrId("id_tooltip_tool_select"); tool: Editor.Tool.Select } BarSeparator { } @@ -323,7 +335,10 @@ ApplicationWindow function zoom(dir) { if ( dir === 0 ) // all + { + preview = false zoomscale = zoommax + } else if ( dir > 0 ) // in { if ( (zoomscale *= zoomstep) > zoommax ) diff --git a/qml.qrc b/qml.qrc index b0b87ca..1780ed7 100644 --- a/qml.qrc +++ b/qml.qrc @@ -30,5 +30,9 @@ image/minus_icon&48.png image/plus_icon&48.png image/eye_icon&48.png + image/exit_icon&48.png + image/grid_icon&48.png + image/info_icon&48.png + image/zoom_icon&48.png -- cgit v1.2.3