Commit Graph

21 Commits

Author SHA1 Message Date
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
joshua bce6a43427 Several terminals can be removed or moved from strip in one shot 2022-04-10 13:52:45 +02:00
joshua edfb23be23 Change terminal strip editor class
Change parent class from QDialog to QWidget.
Terminal strip editor is now embedded in TerminalStripEditorWindow.
2022-03-20 18:25:25 +01:00
joshua 9cbc3a2265 Add table widget and item model for free terminal
WIP, the change made in the table widget can't be applied.
2022-03-12 19:07:49 +01:00
joshua ce8bd7fae3 Add terminal bridge feature 2021-12-01 21:27:04 +01:00
joshua 3fdba11c73 Add buttons to quickly edit the type, function and led of several terminal at once. 2021-10-27 20:54:34 +02:00
joshua 107d7ff806 Level of real terminal can be edited
The level of each real terminal who compose a physical terminal can be
edited. Several real terminal can be edited in one shot.
2021-10-12 19:25:35 +02:00
joshua 828424cae8 Level terminals can be disassembled 2021-10-04 21:26:51 +02:00
joshua dca643f7aa Multi-level terminal can be created. 2021-10-03 13:22:21 +02:00
joshua 1699ad9dd8 Add a push button to automatically reorder the terminal strip 2021-09-22 23:02:33 +02:00
joshua cc6f66ad11 terminal function can be edited, edted value is applied to element 2021-07-17 13:44:44 +02:00
joshua efed7ab5c0 Minor gui change 2021-07-12 19:16:01 +02:00
joshua f410fbf7e2 Remove position section of terminalStripModel 2021-06-07 21:56:27 +02:00
joshua a1e18d2bba Add terminalStripModel class 2021-06-07 19:26:41 +02:00
joshua 580ebe8b97 Terminal strip can now be edited and managed by undo command 2021-05-11 18:20:46 +02:00
joshua e0579b3040 Add widgets to edit terminal strip data (WIP) 2021-05-11 18:20:46 +02:00
joshua 36068abce7 Add a reload push button
Add a reload push button to quickly reload/update the gui according to
the current state of the terminal strip.
2021-05-11 18:20:46 +02:00
joshua d3ad490b84 Initial comit to use drag and drop 2021-05-11 18:20:46 +02:00
joshua 63429ab087 Terminal strip editor display the free terminal elements 2021-05-11 18:20:46 +02:00
joshua 91db58bb64 Add dialog to create terminal strip + display existing terminal strip 2021-05-11 18:20:46 +02:00
joshua bbfe9ed377 Add terminal strip editor widget 2021-05-11 18:20:46 +02:00