Qcad Theme Apps

Discussion forum for C++ and script developers who are using the QCAD development platform or who are looking to contribute to QCAD (translations, documentation, etc).

Moderator: andrew

Forum rules

Always indicate your operating system and QCAD version.

Attach drawing files, scripts and screenshots.

Post one question per topic.

User avatar
petevick
Premier Member
Posts: 413
Joined: Tue May 19, 2020 9:34 am
Location: North Norfolk coast UK

Re: Qcad Theme Apps

Post by petevick » Sun Jan 07, 2024 7:56 am

If this wasn't to your taste - https://www.qcad.org/rsforum/viewtopic. ... =15#p43294 - here's another take on the colour Royal Blue.....

Screenshot from 2024-01-07 06-43-57.png
Screenshot from 2024-01-07 06-43-57.png (143.93 KiB) Viewed 2090402 times
Royal Blue.zip
(25.69 KiB) Downloaded 1798 times
Pete Vickerstaff
Linux Mint 21.3 Cinnamon, Qcad Pro 3.31.1

bob93
Active Member
Posts: 26
Joined: Sat Jan 28, 2023 11:35 pm

Re: Qcad Theme Apps

Post by bob93 » Fri Mar 01, 2024 8:29 am

EDIT: The last thing I did before it stopped saving was to make almost all pairs of button top/bottom gradient colors equal (because I wanted to create a theme that's mostly flat/solid fill except for some things) and then set Push and Toolbar buttons to solid fill

Alright, so I've been trying some colors with Qcad theme designer. I don't know what happened but I arrived at a point where every time I try to save my theme I get this error:

" backg" is an invalid integer.

Press OK to ignore and risk data corruption.
Press Abort to kill the program


qcadthemedesignererror.PNG
qcadthemedesignererror.PNG (12.82 KiB) Viewed 2089753 times
I was able to save it normally, I don't know what happened. I'm attaching the stylesheet file
Attachments
stylesheet.zip
(2.89 KiB) Downloaded 1358 times

User avatar
petevick
Premier Member
Posts: 413
Joined: Tue May 19, 2020 9:34 am
Location: North Norfolk coast UK

Re: Qcad Theme Apps

Post by petevick » Fri Mar 01, 2024 8:59 am

bob93 wrote:
Fri Mar 01, 2024 8:29 am
EDIT: The last thing I did before it stopped saving was to make almost all pairs of button top/bottom gradient colors equal (because I wanted to create a theme that's mostly flat/solid fill except for some things) and then set Push and Toolbar buttons to solid fill

Alright, so I've been trying some colors with Qcad theme designer. I don't know what happened but I arrived at a point where every time I try to save my theme I get this error:

" backg" is an invalid integer.

Press OK to ignore and risk data corruption.
Press Abort to kill the program



qcadthemedesignererror.PNG

I was able to save it normally, I don't know what happened. I'm attaching the stylesheet file
Thanks for this. I'm currently updating QTD, I'll add this to the 'list' and see if I can find what caused the error. Hopefully with the information you've provided I can sort it out.
Pete Vickerstaff
Linux Mint 21.3 Cinnamon, Qcad Pro 3.31.1

User avatar
petevick
Premier Member
Posts: 413
Joined: Tue May 19, 2020 9:34 am
Location: North Norfolk coast UK

Re: Qcad Theme Apps

Post by petevick » Fri Mar 01, 2024 3:58 pm

bob93 wrote:
Fri Mar 01, 2024 8:29 am
EDIT: The last thing I did before it stopped saving was to make almost all pairs of button top/bottom gradient colors equal (because I wanted to create a theme that's mostly flat/solid fill except for some things) and then set Push and Toolbar buttons to solid fill

Alright, so I've been trying some colors with Qcad theme designer. I don't know what happened but I arrived at a point where every time I try to save my theme I get this error:

" backg" is an invalid integer.

Press OK to ignore and risk data corruption.
Press Abort to kill the program



qcadthemedesignererror.PNG

I was able to save it normally, I don't know what happened. I'm attaching the stylesheet file
The only thing I can see that has a possibility of creating the error is to do with Tab Bars - Hovered gradient top in the Misc tab, and even then I'm struggling to see how it could happen. Is it possible that you'd just changed the colour for Hovered gradient top prior to the error occurring ?
There's certainly nothing wrong with the stylesheet you attached.
Pete Vickerstaff
Linux Mint 21.3 Cinnamon, Qcad Pro 3.31.1

bob93
Active Member
Posts: 26
Joined: Sat Jan 28, 2023 11:35 pm

Re: Qcad Theme Apps

Post by bob93 » Fri Mar 01, 2024 10:28 pm

Here's how I was able to reproduce the problem on Windows, Qcad Theme Designer v5.2.1:
Load default style
Save it in a folder on the desktop
Go to Push Buttons tab and set all Gradient tops and Gradient bottoms to the same color (for example red, see attached image 1)
Go to Toolbar Buttons tab and do the same (see attached image 2)
Save the theme. It saves normally
Go back Push buttons tab and select Solid Fill
Go to Toolbar Buttons tab and select Solid Fill as well
Save theme. Error appears.

Nothing to do with the Misc. tab apparently.
Only way to save theme after error appears is to select Gradient Fill instead of Solid Fill
1.PNG
1.PNG (116.29 KiB) Viewed 2089691 times
2.PNG
2.PNG (114.82 KiB) Viewed 2089691 times

User avatar
petevick
Premier Member
Posts: 413
Joined: Tue May 19, 2020 9:34 am
Location: North Norfolk coast UK

Re: Qcad Theme Apps

Post by petevick » Fri Mar 01, 2024 10:33 pm

Thanks bob93, that's just what I need to track the problem down :wink:
Pete Vickerstaff
Linux Mint 21.3 Cinnamon, Qcad Pro 3.31.1

User avatar
petevick
Premier Member
Posts: 413
Joined: Tue May 19, 2020 9:34 am
Location: North Norfolk coast UK

Re: Qcad Theme Apps

Post by petevick » Sat Mar 02, 2024 7:52 am

bob93 wrote:
Fri Mar 01, 2024 10:28 pm
Here's how I was able to reproduce the problem on Windows, Qcad Theme Designer v5.2.1:
Load default style
Save it in a folder on the desktop
Go to Push Buttons tab and set all Gradient tops and Gradient bottoms to the same color (for example red, see attached image 1)
Go to Toolbar Buttons tab and do the same (see attached image 2)
Save the theme. It saves normally
Go back Push buttons tab and select Solid Fill
Go to Toolbar Buttons tab and select Solid Fill as well
Save theme. Error appears.

Nothing to do with the Misc. tab apparently.
Only way to save theme after error appears is to select Gradient Fill instead of Solid Fill
I can now replicate the error so hopefully I should be able to fix it. Thanks again for the extra information bob93.
Pete Vickerstaff
Linux Mint 21.3 Cinnamon, Qcad Pro 3.31.1

User avatar
petevick
Premier Member
Posts: 413
Joined: Tue May 19, 2020 9:34 am
Location: North Norfolk coast UK

Re: Qcad Theme Apps

Post by petevick » Sat Mar 02, 2024 11:04 am

bob93 wrote:
Fri Mar 01, 2024 10:28 pm
Here's how I was able to reproduce the problem on Windows, Qcad Theme Designer v5.2.1:
Load default style
Save it in a folder on the desktop
Go to Push Buttons tab and set all Gradient tops and Gradient bottoms to the same color (for example red, see attached image 1)
Go to Toolbar Buttons tab and do the same (see attached image 2)
Save the theme. It saves normally
Go back Push buttons tab and select Solid Fill
Go to Toolbar Buttons tab and select Solid Fill as well
Save theme. Error appears.

Nothing to do with the Misc. tab apparently.
Only way to save theme after error appears is to select Gradient Fill instead of Solid Fill
Hi bob93, I've found and fixed what was causing the error, it'll be included in the next version. Using actual colours like red, blue, green caused the error, all to do with how colours are handled by the Lazarus code.
I'll be uploading it probably sometime this month.
Pete Vickerstaff
Linux Mint 21.3 Cinnamon, Qcad Pro 3.31.1

bob93
Active Member
Posts: 26
Joined: Sat Jan 28, 2023 11:35 pm

Re: Qcad Theme Apps

Post by bob93 » Sat Mar 02, 2024 1:35 pm

petevick wrote:
Sat Mar 02, 2024 11:04 am
Hi bob93, I've found and fixed what was causing the error, it'll be included in the next version. Using actual colours like red, blue, green caused the error, all to do with how colours are handled by the Lazarus code.
I'll be uploading it probably sometime this month.
Nice, that was quick!
I'm not sure what you mean by actual colors though. The first time I saw the error (when I sent the stylesheet file) I was using greys instead of red. Both greys from the palette and custom greys I had defined. Hopefully your fix takes care of all of this. Fingers crossed

Now, while I was dealing with this I seem to have come across another issue.
qcadthemedesignererror2.PNG
qcadthemedesignererror2.PNG (35.11 KiB) Viewed 2089610 times
I only captured part of the window which was huge. If I resize this window to a smaller size then it looks like this (folders don't show):
qcadthemedesignererror2b.PNG
qcadthemedesignererror2b.PNG (23.39 KiB) Viewed 2089610 times

User avatar
petevick
Premier Member
Posts: 413
Joined: Tue May 19, 2020 9:34 am
Location: North Norfolk coast UK

Re: Qcad Theme Apps

Post by petevick » Sat Mar 02, 2024 4:08 pm

bob93 wrote:
Sat Mar 02, 2024 1:35 pm

Now, while I was dealing with this I seem to have come across another issue.

qcadthemedesignererror2.PNG

I only captured part of the window which was huge. If I resize this window to a smaller size then it looks like this (folders don't show):

qcadthemedesignererror2b.PNG
I've pretty much redesigned the browser and the way all the components are positioned, so that should cure what I'm seeing there. I've never come across that !! Here's a pre upload taster......
open browser.png
open browser.png (35.14 KiB) Viewed 2089581 times
Pete Vickerstaff
Linux Mint 21.3 Cinnamon, Qcad Pro 3.31.1

333onlyhalfevil
Full Member
Posts: 92
Joined: Fri Apr 28, 2023 12:39 pm

Re: Qcad Theme Apps

Post by 333onlyhalfevil » Sun Mar 03, 2024 8:23 pm

Is there a script/plugin version of this? It would be cool if the edit dropdown menu had a themes button that opened it within qcad.

User avatar
petevick
Premier Member
Posts: 413
Joined: Tue May 19, 2020 9:34 am
Location: North Norfolk coast UK

Re: Qcad Theme Apps

Post by petevick » Sun Mar 03, 2024 9:28 pm

333onlyhalfevil wrote:
Sun Mar 03, 2024 8:23 pm
Is there a script/plugin version of this? It would be cool if the edit dropdown menu had a themes button that opened it within qcad.
no script version I'm afraid. In the next version you will be able to open Qcad with the current Qcad Theme Designer theme, and after closing Qcad choose to either keep the original Qcad theme or replace it with the Qcad Theme Designer theme.
Pete Vickerstaff
Linux Mint 21.3 Cinnamon, Qcad Pro 3.31.1

CVH
Premier Member
Posts: 4875
Joined: Wed Sep 27, 2017 4:17 pm

Re: Qcad Theme Apps

Post by CVH » Mon Mar 04, 2024 6:45 am

333onlyhalfevil wrote:
Sun Mar 03, 2024 8:23 pm
Is there a script/plugin version of this? It would be cool if the edit dropdown menu had a themes button that opened it within qcad.
One can start external processes from within QCAD.
Catch22: QCAD must be restarted to apply a new Theme. :roll:

Regards,
CVH

User avatar
petevick
Premier Member
Posts: 413
Joined: Tue May 19, 2020 9:34 am
Location: North Norfolk coast UK

Re: Qcad Theme Apps

Post by petevick » Tue May 21, 2024 3:43 pm

Qcad Theme Designer update, version 5.3

Version 5.3 is a major update, it introduces a lot of new additions, changes and bug fixes.

Qcad Theme Designer is now fully portable, everything is now contained in one folder. To that end you will notice that there are now only two attachments to choose from. The two zipped files are for Linux and Windows. Download the relevant zip file for your OS and extract the folder to any writable location. In the root of the Linux folder is an x86_64 and an i386 executable, open the one that suits your CPU architecture, the Windows folder has only one executable. You can create a launcher/shortcut from within QTD using the new 'Edit>Create a desktop launcher/shortcut' menu item.
The Windows executable is digitally signed and has been verified as safe by Microsoft (view the attached Microsoft verification.pdf file). However, in Windows 7 you may still get a security warning - "The publisher could not be verified". To disable this, right click on the executable, select Properties, and at the bottom of the General tab in the security section, click the Unblock button.

NEW
  • A 'New' menu item has been added to the Theme menu. **
  • A 'Preview in Qcad' menu item has been added to the Theme menu. **
  • A 'Bookmarks' menu item has been added to the Theme menu. A Bookmarks Manager is also included. **
  • A 'Create a desktop launcher/shortcut' menu item has been added to the Edit menu. **
  • Dock widget title labels have been added to Tool Matrix and Tree View preview group box.
  • In the Misc tab in the 'Tab Bars Inactive/Hovered' group box, a new 'Hovered gradient top' button has been added.
  • In the Font Overrides/Fonts/Combo List, a Disabled font colour button has been added.
  • You can now resize the application window, the width and height are saved to the configuration file.
** view the help file for details

CHANGES
  • All references to 'stylesheet' have been replaced with 'theme'.
  • Enhanced Font Preview for Font Overrides. Where there are two font colour buttons, the Preview will now update when the mouse pointer hovers over the second button. It now also displays gradient colours.
  • The Misc tab in the 'Tab Bars Inactive/Hovered' group box, 'Gradient top' button is now named 'Inactive gradient top'
  • With Font Overrides enabled, The Global Fonts group box is no longer disabled. This is to allow font changes to any widgets font that are not covered in Font Overrides.
  • With either the 'Theme/Common/Menu/Icons' or the 'Misc' tab active, when the mouse pointer enters each group box only it's relative preview group box is highlighted. Previously all the preview group boxes were highlighted. Similarly, in the Fonts tabs, some of the preview areas are highlighted more specifically.
  • The Shortcuts dialogue display has been improved to give cross platform uniformity.
  • In Windows, with the Shortcuts dialogue displayed, the dialogue now follows the main app window when it's moved. Previously the Shortcuts dialogue would be static until the main app move was completed.
  • Group Undo/Redo has been improved.
  • The Default theme, which previously was green based, is now monochrome.
  • The application caption now displays the current theme name instead of CPU bitness/OS.
  • In the main app and browser, the icon colour no longer changes with the check icon colour, this was an unnecessary distraction and overhead, it now displays only green based icons.
  • In Linux and Windows the browser tree now uses stylised green icons, 'QTD' and 'Qcad' are displayed on their specific theme folders. Only QTD folders can be opened.
  • The ability to rename a folder in the Browser has been removed, it was proving to be unstable due to how the treeview updates itself.
  • The current theme in Qcad has been added to the Theme Information dialogue.
  • Significant improvements and changes to the Browser.
  • Significant GUI changes and improvements.
FIXED BUGS
  • With Font Overrides enabled, Fonts 1 tab, Push Buttons group box, the Normal and Hover buttons, were not displaying the gradient colour correctly.
  • Font Overrides, Fonts tab, Command History, Command Line and Combo List and Fonts 1 tab, Dock Titles and Labels group boxes were all displaying an incorrect hint.
  • Font Overrides, a few font colour buttons were not updating when Bold/Italic were selected.
  • Selecting a new theme colour resulted in a some font colour buttons not being updated in Font Overrides.
  • Undoing after selecting a new theme colour resulted in a some font colour buttons not being updated in Font Overrides.
  • QTD's browser was unable to create an 'Untitled Folder' folder if a folder of that folder name existed, now it behaves the same as the system file browser.
  • After creating a folder in the Browser it was possible that another folder with the same name was selected.
  • QTD's browser was unable to delete a folder immediately after creating a new folder.
  • In Windows after using 'Copy to Qcad', if you shutdown and reopened QTD, QTD was unable to open the theme that was copied.
  • Using certain button colours generated an error when combined with using the Solid Fill option for Push and Tool buttons.
A massive thanks to John Hyslop for all the suggestions and endless checking he's done over the last 5 months or so. :wink:

Qcad Theme Designer 5.3 - Windows.zip
(3.17 MiB) Downloaded 221 times
Qcad Theme Designer 5.3 - Linux.zip
(5.44 MiB) Downloaded 203 times
Attachments
Microsoft verification.pdf
(25.86 KiB) Downloaded 1584 times
Last edited by petevick on Fri Jun 21, 2024 5:27 pm, edited 1 time in total.
Pete Vickerstaff
Linux Mint 21.3 Cinnamon, Qcad Pro 3.31.1

User avatar
petevick
Premier Member
Posts: 413
Joined: Tue May 19, 2020 9:34 am
Location: North Norfolk coast UK

Re: Qcad Theme Apps

Post by petevick » Wed Jun 12, 2024 5:32 pm

Qcad Theme Lite update, version 2.7

Version 2.7 is a moderate update with several new additions, changes and bug fixes.

As with the latest version of Qcad Theme Designer, Qcad Theme Lite is now fully portable, everything is now contained in one folder. To that end you will notice that there are now only two attachments to choose from. The two zipped files are for Linux and Windows. Download the relevant zip file for your OS and extract the folder to any writable location. In the root of the Linux folder is an x86_64 and an i386 executable, open the one that suits your CPU architecture, the Windows folder has only one executable. You can create a desktop launcher/shortcut from within QTL using the new Preferences>Create a desktop launcher/shortcut' menu item.
The Windows executable has been verified as safe by Microsoft.

NEW
  • A 'New' menu item has been added to the Theme menu.
  • A 'Preferences' top level menu item has been added, this is populated with the following menu items
    • Create a desktop launcher/shortcut (OS dependant)
    • Show/Hide Browser node lines (saved to the config file)
    • Browser expand sign +/- (saved to the config file)
    • Browser expand sign arrow (saved to the config file)
      The following displays node lines and the +/- expand sign.....
      .
      open browser.png
      open browser.png (28.45 KiB) Viewed 2086827 times
  • This version of QTL is aware of the new font colour buttons added to Font Overrides in QTD v5.3
  • 'STEP 2' and 'STEP 3' labels change to 'Click to restore' when the theme colour and icon colour values change.
  • Local flyout hint tips have been added.
  • You can now resize the application window, the width and height are saved to the configuration file.
  • The Browser position and size is now saved to the configuration file.
  • The position of the Browser is relative to the main app window position.
CHANGES
  • All references to 'stylesheet' have been replaced with 'theme'.
  • The browser tree now uses stylised green icons, 'QTL' and 'Qcad' are displayed on their specific theme folders. Only QTL folders can be opened.
  • The ability to rename a folder in the Browser has been removed, it was proving to be unstable due to how the tree view updates itself.
  • Significant improvements and changes to the Browser.
  • Numerous GUI changes and improvements.
FIXED BUGS
  • Unpopulated recent file items were not disabled.
  • After creating a folder in the Browser it was possible that another folder with the same name was selected.
  • QTL now correctly indicates if font overrides exist in the current theme.
  • In certain situations the browser Delete button is enabled when the User folder is selected.
  • The browser Delete button was enabled when a read only folder was selected.
Attachments
Qcad Theme Lite 2.7 - Windows.zip
(2.31 MiB) Downloaded 1134 times
Qcad Theme Lite 2.7 - Linux.zip
(4.41 MiB) Downloaded 1088 times
Last edited by petevick on Fri Jun 21, 2024 5:28 pm, edited 1 time in total.
Pete Vickerstaff
Linux Mint 21.3 Cinnamon, Qcad Pro 3.31.1

Post Reply

Return to “QCAD Programming, Script Programming and Contributing”