Commit Graph

144 Commits

Author SHA1 Message Date
Jeff Patterson a4d5b7a12a Draw the folio icons as SVGs
The folio icons (Add, Remove, Properties, New folio, Title block
template) were anti-aliased gray page drawings, and the previous commit
left them untouched on the dark palette, where their soft gray fills
read blurry next to the line-art icons. They are now pixel-grid SVGs in
ico/scalable/ in the style of the Add PDF icon: a landscape sheet with
a title block line, a plus or minus badge in the corner, text lines for
properties, a filled title block for the template. Same 24 pixel canvas
as pdf-import.svg, same currentColor recoloring for the dark theme.

Only the 22 pixel PNGs go: five files leave ico/22x22 and both .qrc
files, and the alias list in misc/make_icon_themes.py that exposed
three of them under a second name is down to conductor2.png. The 16
pixel files stay, so menus and the projects panel keep their icons at
that size, and the 128 pixel diagram.png stays for the configuration
page list.

tests/qttest/tst_qeticons: every file in ico/scalable/ resolves in both
themes at 22, 24, 32 and 64 pixels, dark ink on light and light ink on
dark, with no 22 pixel PNG left beside it; the light-art check reads
the folio family at 16 pixels, where the page art remains.
2026-09-19 12:02:55 -05:00
Jeff Patterson ba29dc45a0 Draw the Add PDF icon as an SVG
The "Add PDF" action used ico/22x22/pdf-import.png, a white page with a
red PDF mark that sat apart from its neighbors "Add text" and "Add
image", both gray line art in a square frame with a plus. It is now
ico/scalable/pdf-import.svg, the same pixel design as insert-image.png:
a frame, the letters PDF, a plus in the corner. One file serves every
slot and stays sharp on high-DPI screens; the PNG is gone from both
.qrc files.

The canvas is 24 pixels with the art offset by one, like the Breeze
SVGs already in the theme. Fusion's toolbar slot is 24 pixels: a 22
pixel PNG is drawn unscaled inside it, but a scalable icon is rendered
at the slot size, and a 22 pixel grid stretched to 24 puts every one
pixel line between pixels and reads blurry.

The file uses currentColor like the Breeze SVGs already in the theme,
so misc/make_icon_themes.py produces the dark copy the same way. A new
ico/scalable/ folder holds QET's own vector icons; the direction
arummler asked for in #690.

tests/qttest/tst_qeticons: the icon resolves in both themes at 16, 22,
32 and 64 pixels, dark ink on the light theme and light ink on the dark
one, and no 22 pixel PNG remains.
2026-09-19 12:02:54 -05:00
Jeff Patterson d06c7be606 Leave light icons out of the dark theme
misc/make_icon_themes.py sorted icons by saturation alone, so a white
page with a small red mark counted as line art and its dark copy turned
the page black: the PDF import icon read black on black (#919,
Kellermorph), and the folio, diagram and label icons came out as dark
pages with a light border.

An icon whose visible pixels are at least 30% near white is now "light
art" and inherits from the qet theme untouched; it already reads on a
dark toolbar. The generator also removes dark files it no longer
produces, so a reclassified icon falls back to the light theme instead
of keeping a stale copy. Thirteen files leave ico/themes/qet-dark.

tests/qttest/tst_qeticons: every dark theme file, taken as its mean
visible color, reaches 3:1 on the dark palette's window color; the
lightest-pixel check it replaces let a black page with a light border
through. Asking the dark theme for pdf-import, diagram, label, the
folio icons and diagram_bg returns the light art.
2026-09-19 12:02:54 -05:00
Jeff Patterson 800ddfbcbe Add a "qet-dark" icon theme for dark palettes
189 of QET's 266 fixed-size icons are black line art with no dark
variant, so on a dark palette they were black on a dark toolbar, and
Fusion's disabled rendering lightened them into something more readable
than the enabled state (GitHub #466, #870; bugtracker 335 for the
element panels, which keep their own fix).

The theme "qet-dark" holds light-ink copies of the line-art icons in
ico/themes/qet-dark, generated by misc/make_icon_themes.py. Colored
icons are not copied; the theme inherits them from "qet". An icon counts
as line art when fewer than 20% of its visible pixels are saturated. The
copies keep hue and alpha and invert lightness, scaled so each icon's
darkest ink becomes (220,220,220), the dark palette's text color. The
eight SVG icons get their color replaced the same way.

QETApp::applyIconTheme() picks "qet-dark" for a dark palette and "qet"
otherwise. It runs from initIconTheme(), again from initStyle() once the
palette is final, and on the OS color scheme switch. Icons created with
QIcon::fromTheme() re-resolve on their next paint, so nothing else
changes.

With light-ink files, Fusion's own disabled rendering comes out dimmer
than enabled with no extra code.

tests/qttest/tst_qeticons: every name resolves in both themes, every
dark file has light ink, and a Fusion tool button shows its icon at 3:1
in both themes with disabled weaker than enabled.
2026-09-18 05:06:51 -05:00
Jeff Patterson 8ef130a59d Add a "qet" icon theme and load icons by name
QET had no icon theme: the 446 entries of the icon table and the 116
iconsets in .ui files each named a resource path, so an icon could only
ever be one file, and a variant for another palette or a vector source
had nowhere to go (GitHub #466, #690, #870). This adds the theme layout
without changing a single pixel; a dark variant comes in a follow-up.

The theme "qet" follows the freedesktop layout Qt's icon loader
understands. misc/make_icon_themes.py generates ico/icon-themes.qrc,
which aliases the existing ico/<size>/<name>.png files into
themes/qet/<size>/<name>.png, and ico/themes/qet/index.theme. No file
moves. The four table entries that paired a 16 pixel file with a 22
pixel file of another name (ConductorSettings, DiagramAdd,
DiagramDelete, DialogInformation) get the 22 pixel file aliased under
the 16 pixel name.

QETApp::initIconTheme() registers the theme before initIcons() and makes
it current on every platform, so a desktop icon theme cannot replace
QET's icons. Icons are then looked up by name: QIcon::fromTheme() in
qeticons.cpp and in the few places that built a QIcon from a resource
path directly, and theme="..." on the iconsets in .ui files, with the
resource path kept as fallback. Flags, color swatches, application and
MIME icons stay on their paths.

One entry does not go through the theme. The elements panel draws the
project root with ProjectFileGP in the 50 pixel slot it reserves for
element previews, and the name "project" also carries the 128 pixel
file the configuration dialog uses. On a 2x display Qt's loader picks
that file for a 50 pixel request and fills the slot. ProjectFileGP
loads the 16 and 22 pixel files directly, as before.

tests/qttest/tst_qeticons: every name in the theme resolves, the four
aliases resolve at 22 pixels, a Fusion tool button shows its icon at
3:1 with disabled weaker than enabled, and the project root icon stays
at 22 pixels or less when asked for 50 at 2x while the configuration
dialog still gets its 128 pixel file. The rendering helpers shared
with tst_qetpalette moved to tests/qttest/inkcontrast.h.
2026-09-17 05:41:50 -05:00
Andre Rummler 296f142036 Adding icons to graphs and image operations. 2026-09-07 10:44:30 +02:00
Andre Rummler 6b577ee757 Add editable resize/rotate/skew handles for shapes and images
Shapes and images can now be resized, rotated, and skewed directly
on the canvas, not just moved. Both share one small transform
struct (rotation, then skew, then scale, anchored on a movable
pivot) and one handle widget, so a corner drag, an edge skew, or
grabbing the rotate handle behaves the same way and runs through
the same matrix math everywhere, instead of every item type
reinventing its own.

Shapes also gained a proper pen tool (bezier paths, corner/smooth/
symmetric nodes), arc support, and mirroring. Images gained
non-destructive cropping and colour-keyed transparency, both
remember their own settings, so reopening the dialog picks up
where you left off instead of starting over.

Properties dialogs for both were extended to match (position,
size, angle, skew), with undo/redo wired through for every handle
drag.

Old XML files can read easily as the transformation is only added
if needed and the old syntax is still used and understood if it is
not needed.
2026-09-05 15:48:28 +02:00
Kellermorph ff25a77159 Improve PDF import: DPI selection, page preview, Qt5 compat, custom icon
- Add DPI selection (150/300/600) to the page selection dialog
- Add live page preview in the selection dialog
- Conditionally compile PDF import only for Qt6 (#if QT_VERSION)
- Add custom pdf-import icon (PDF document with + symbol)
- Register new icon in qelectrotech.qrc
- Qt5 builds: PDF import action is hidden, everything else works as before
2026-08-22 18:53:36 +02:00
Kellermorph 4e0c075575 Fix grid and guide startup behavior and update german translation 2026-06-16 17:41:03 +02:00
plc-user bd3b39cea3 element-editor: fix rotation, add mirror, add flip for graphical primitives
Now that the problem with the translations of keyboard shortcuts has been resolved and rotation using the space bar works reliably in principle, I took a closer look at the rotation function itself in the element editor.

I noticed, for example, that arcs can be rotated at an angle of 15°. This doesn't really make sense, as the “arc” part doesn't have the “rotation” property. There is only width and height.
And somehow rotating arcs didn't work well: start- and span-angles weren't adjusted.

Lines and polygons can be rotated in 15° increments, which doesn't make much sense, if other parts that can only be rotated in 90° increments are selected at the same time.

To make a long story short:
I reworked the rotation functions of the graphical parts so that now all parts are rotated in 90° steps around the origin! This means that it is now possible to mark several parts and rotate them around the same point at the same time!

In addition, the functions for mirroring graphic parts at y-axis (shortcut "M") and flipping at x-axis (shortcut "F") have been implemented.

I have saved the text elements for later!
(or someone else)
2025-02-14 20:31:03 +01:00
Laurent Trinques ffba440c6e Rename (be) translation to Belgium-Flemish nl_BE 2025-01-05 13:55:48 +01:00
plc-user f12b11bee3 added folder "company-titleblocks" \(incl. language-files\) 2023-12-16 09:32:44 +01:00
plc-user 72092300ed added icons for "company-collection" 2023-12-09 12:02:52 +01:00
Laurent Trinques 888c25ec02 Add Chinese switch 2023-08-27 12:36:08 +02:00
Laurent Trinques 845bd38d88 Refresh splash image size 2023-01-24 17:59:47 +01:00
Laurent Trinques ae493f16c6 Update splash image 2023-01-24 07:28:32 +01:00
Laurent Trinques 0f8f26e177 Refrersh splash 2021-03-23 00:58:56 +01:00
Laurent Trinques 56bb2a399b Refresh splash size 2021-02-28 05:56:59 +01:00
Laurent Trinques 454b2c8a0f Update splash to 0.9 version 2021-02-22 16:22:08 +01:00
Laurent Trinques 081f44f8be Element Editor add new ColorHTML, THANKS Arnaud for the patch 2020-04-15 10:27:54 +02:00
Laurent Trinques abdcef1c46 Splash : minor change 2019-07-21 16:24:01 +02:00
Laurent Trinques 528cb870a7 Update splash 2019-07-21 16:17:13 +02:00
blacksun 1cd8912d64 Add new icons, thank Nuri.
git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@5539 bfdf4180-ca20-0410-9c96-a3a8aa849046
2018-09-29 15:58:29 +00:00
blacksun 81f6bb4a5a Minor : fix missing icons
git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@5536 bfdf4180-ca20-0410-9c96-a3a8aa849046
2018-09-27 17:40:05 +00:00
scorpio810 f4a233345a Minor icon for macOS
git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@5133 bfdf4180-ca20-0410-9c96-a3a8aa849046
2017-12-02 20:34:16 +00:00
scorpio810 4502eee1ce Minor icon change
git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@5132 bfdf4180-ca20-0410-9c96-a3a8aa849046
2017-12-02 19:37:37 +00:00
nuri 553eadb332 icon theme: add new icons
git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@5120 bfdf4180-ca20-0410-9c96-a3a8aa849046
2017-11-27 23:41:24 +00:00
nuri dbd867d604 icon theme: add new icons in element editor
git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@5119 bfdf4180-ca20-0410-9c96-a3a8aa849046
2017-11-27 20:27:49 +00:00
blacksun 2bf4e330f4 Add initial support of texts group
git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@5117 bfdf4180-ca20-0410-9c96-a3a8aa849046
2017-11-27 19:37:39 +00:00
nuri d31d360340 icon theme: add missing icons in size 16x16px
git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@5116 bfdf4180-ca20-0410-9c96-a3a8aa849046
2017-11-26 22:20:35 +00:00
nuri fc4ecb5587 icon theme: add missing icons in size 16x16px
git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@5115 bfdf4180-ca20-0410-9c96-a3a8aa849046
2017-11-26 21:13:56 +00:00
nuri 79b578dcf7 icon theme: add new icons for titleblock placement (bottom or right)
git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@5114 bfdf4180-ca20-0410-9c96-a3a8aa849046
2017-11-26 08:03:26 +00:00
nuri b0e185c506 icon theme: add missing icons in size 16x16px
git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@5113 bfdf4180-ca20-0410-9c96-a3a8aa849046
2017-11-26 07:13:14 +00:00
nuri 22756eff42 icon theme: add missing icons in size 16x16px
git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@5112 bfdf4180-ca20-0410-9c96-a3a8aa849046
2017-11-26 06:36:06 +00:00
nuri dd2c45ab64 icon theme: add dedicated icons for actions "show only this folder" and "show all folders" in the collection panel
git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@5110 bfdf4180-ca20-0410-9c96-a3a8aa849046
2017-11-26 04:54:31 +00:00
nuri 947b933941 new icon theme: update subversion repository to the new folders and files used by the new theme
git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@5109 bfdf4180-ca20-0410-9c96-a3a8aa849046
2017-11-26 03:46:48 +00:00
nuri 9f3024545f Set the KDE "Breeze" icon theme as new icon theme for QElectroTech
git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@5108 bfdf4180-ca20-0410-9c96-a3a8aa849046
2017-11-25 07:44:38 +00:00
scorpio810 48778d901c Update splash version
git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@5031 bfdf4180-ca20-0410-9c96-a3a8aa849046
2017-08-25 07:28:30 +00:00
scorpio810 ecfb49c227 Fix libpng warning: iCCP: known incorrect sRGB profile, thanks LETARTARE
git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@4995 bfdf4180-ca20-0410-9c96-a3a8aa849046
2017-07-27 21:46:34 +00:00
scorpio810 9fdb5ff4fe Refresh icons
git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@4979 bfdf4180-ca20-0410-9c96-a3a8aa849046
2017-06-14 13:32:52 +00:00
scorpio810 e37a7450b4 Convert svg icons to png
Workaround to fix segfault on Fedora, thanks Remi for reporting this issue
see : https://bugzilla.redhat.com/show_bug.cgi?id=1461390



git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@4978 bfdf4180-ca20-0410-9c96-a3a8aa849046
2017-06-14 11:56:32 +00:00
scorpio810 77ebe00105 Update displayed Version and Splash
git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@4975 bfdf4180-ca20-0410-9c96-a3a8aa849046
2017-06-13 09:38:46 +00:00
scorpio810 c0b5aa7a59 Minor: RichTextEditor : add action to Create superscript or subscript
text or numbers


git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@4798 bfdf4180-ca20-0410-9c96-a3a8aa849046
2016-12-04 03:50:12 +00:00
scorpio810 7394abfbd5 Update macOS packaging
git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@4796 bfdf4180-ca20-0410-9c96-a3a8aa849046
2016-12-02 11:58:38 +00:00
scorpio810 6fc732aa09 Minor
git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@4711 bfdf4180-ca20-0410-9c96-a3a8aa849046
2016-09-15 15:09:26 +00:00
scorpio810 5e72bff588 Minor : add a link to QET Youtube channel
Add a shortcut F1 for open manual online
Add a link for download latest devel build for Windows (only visible on
Win platform)


git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@4710 bfdf4180-ca20-0410-9c96-a3a8aa849046
2016-09-15 11:48:34 +00:00
scorpio810 c8d9acfd5c Minor : add donate link
git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@4709 bfdf4180-ca20-0410-9c96-a3a8aa849046
2016-09-15 04:35:07 +00:00
scorpio810 54093fe2b1 Minor
git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@4708 bfdf4180-ca20-0410-9c96-a3a8aa849046
2016-09-15 03:42:01 +00:00
scorpio810 2150c62181 Added new entry for launch plugin qet_tb_generator
git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@4676 bfdf4180-ca20-0410-9c96-a3a8aa849046
2016-08-30 21:42:35 +00:00
scorpio810 741426a2d4 Minor : add Nuri icon for grid
git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@4639 bfdf4180-ca20-0410-9c96-a3a8aa849046
2016-08-19 11:33:23 +00:00