Author Topic: AutoCAD 2017 and menu icons  (Read 4671 times)

0 Members and 1 Guest are viewing this topic.

Lupo76

  • Bull Frog
  • Posts: 343
AutoCAD 2017 and menu icons
« on: April 20, 2016, 12:25:57 PM »
I'm damning Autodesk.
About 20 years ago I made an application.
In the several years I have always updated to be compatible with all new versions of AutoCAD (and now BricsCAD also).

Initially I had a * .MNU menu, then I was forced to create a CUI file, then a CUIx  :x
All icons were .BMP, then I had to convert all in PNG. With this I lost compatibility with AutoCAD 2013 and earlier :cry:
Then they added the problem of the light theme and dark theme, forcing me to redo all the icons and have two sets of icons!

Now I find myself with another problem!
The dark theme has dark toolbars and the background of the drop down menu light  :tickedoff:
Help!!!

Any advice on how to solve?

mjfarrell

  • Seagull
  • Posts: 14444
  • Every Student their own Lesson
Re: AutoCAD 2017 and menu icons
« Reply #1 on: April 20, 2016, 12:28:58 PM »
Their implementation of the 'DARK' theme, at least in vertical products other than pure autocad is only partial.
As you note parts of the menu adhere to the them, whereas other potions of the interface are still in the "Light" theme
of past versions.  In this regard they are sloppy and immature.

this would suggest that you forget trying to mimic their theme, and just do your own theme.
Be your Best


Michael Farrell
http://primeservicesglobal.com/

BlackBox

  • King Gator
  • Posts: 3770
Re: AutoCAD 2017 and menu icons
« Reply #2 on: April 20, 2016, 12:31:28 PM »
Don't forget that in 2017, they deprecated the use of 192,192,192 as transparent background - you now have to use PNG with real transparency, or ICO embedded within a resource DLL file.

http://through-the-interface.typepad.com/through_the_interface/2016/03/autocad-2017-for-developers.html
"How we think determines what we do, and what we do determines what we get."

Lupo76

  • Bull Frog
  • Posts: 343
Re: AutoCAD 2017 and menu icons
« Reply #3 on: April 20, 2016, 12:36:23 PM »
Don't forget that in 2017, they deprecated the use of 192,192,192 as transparent background - you now have to use PNG with real transparency, or ICO embedded within a resource DLL file.

http://through-the-interface.typepad.com/through_the_interface/2016/03/autocad-2017-for-developers.html

I I have also discovered this!
For this reason, I have converted all icons in PNG assigning the transparent background (more than 200 icons!)
However, the icons must have in any case different colors depending on the theme (light or dark).
In fact, in AutoCAD 2007, for example, the command MOVE in ribbon is white while in the drop-down menu is black; then two icons for the same command with the same theme  :x

Lupo76

  • Bull Frog
  • Posts: 343
Re: AutoCAD 2017 and menu icons
« Reply #4 on: April 20, 2016, 12:39:08 PM »
this would suggest that you forget trying to mimic their theme, and just do your own theme.

I think it is almost impossible to achieve a single theme that fits with both AutoCAD themes (light and dark).

Also now I dedicate my time to change the size or color of the icons instead of implementing new features!  :tickedoff:

Lupo76

  • Bull Frog
  • Posts: 343
Re: AutoCAD 2017 and menu icons
« Reply #5 on: April 20, 2016, 12:55:04 PM »
I want to remove icons from the drop down menu  :uglystupid2:
Or replace it with another different from the one present in the Ribbon for the same command.
This way I can insert the correct icons in the Ribbon, based on the theme chosen by the user.

However, when I remove or sostituico the icon from the menu item, it is removed or replaced also in the Ribbon.
How can I distinguish the two icons (Ribbon and menus)?

BlackBox

  • King Gator
  • Posts: 3770
Re: AutoCAD 2017 and menu icons
« Reply #6 on: April 20, 2016, 12:59:14 PM »
I think it is almost impossible to achieve a single theme that fits with both AutoCAD themes (light and dark).

Black works great for my apps. :-D


Also now I dedicate my time to change the size or color of the icons instead of implementing new features!  :tickedoff:

You're making it more difficult than it needs to be. :-)

Using Gimp, or Photoshop, etc., have a single 'template' for each icon you need, using a resolution of 1,000 x 1,000 pixels, and simply toggle each theme's layer on (the other off) before you export as PNG with Alpha (transparency).

AutoCAD will automagically resize your 1,000 x 1,000 PNG down to whatever icon size it needs for small/large.

If you have 200 icons, and you decide to use different colors for each theme - yes, you'll end up with 400 icons, but that's a heck of a lot better than 800 (200 @ 32x32 light, 200 @ 16x16 light, 200 @ 32x32 dark, 200 @ 16x16 dark)! :angel:


Cheers
"How we think determines what we do, and what we do determines what we get."

Lupo76

  • Bull Frog
  • Posts: 343
Re: AutoCAD 2017 and menu icons
« Reply #7 on: April 20, 2016, 01:22:33 PM »
If you have 200 icons, and you decide to use different colors for each theme - yes, you'll end up with 400 icons, but that's a heck of a lot better than 800 (200 @ 32x32 light, 200 @ 16x16 light, 200 @ 32x32 dark, 200 @ 16x16 dark)! :angel:

Unfortunately I can not fit my icons to both themes (light and dark).
So I am forced to have 2 icons set (200 + 200).
This is not an issue, I have already made these icons.
However, the dark theme of AutoCAD consists of two backgrounds:
- Dark background for the Ribbon and Toolbars
- Light background for pull-down menus

Currently if I start the CUI command and replace an icon (eg. that menu) is automatically replaced the icon of the Ribbon and Toolbars.
In other words, the icon is assigned to the single command: same icon famous everywhere!
If I see the native AutoCAD commands, menu icons have a different color than those of the ribbon:


Come posso raggiungere lo stesso risultato?

BlackBox

  • King Gator
  • Posts: 3770
Re: AutoCAD 2017 and menu icons
« Reply #8 on: April 20, 2016, 01:37:18 PM »
Come posso raggiungere lo stesso risultato?

Si usted está confiando en CUIx, entonces será necesario tener dos Comandos - uno para la cinta, y uno para el menú, que hacen referencia al icono apropiado para el tema.

Si alguna vez decide utilizar la API .NET o ObjectARX - RibbonButton su aduana, y el Icono de la propiedad MenuItem utiliza Utils.GetAcadResourceIcon () para hacer referencia al icono de aplicación (generalmente de una DLL de recursos). Ejemplo.



If you're relying on CUIx, then you'd need to have two Commands - one for Ribbon, and one for Menu, that reference the appropriate icon for the theme.

If you ever decide to use .NET or ObjectARX API - your custom RibbonButton, and MenuItem's Icon Property uses Utils.GetAcadResourceIcon() to reference the applicable icon (generally from a resource DLL). Example.


HTH
"How we think determines what we do, and what we do determines what we get."

Lupo76

  • Bull Frog
  • Posts: 343
Re: AutoCAD 2017 and menu icons
« Reply #9 on: April 21, 2016, 02:59:07 AM »
If you're relying on CUIx, then you'd need to have two Commands - one for Ribbon, and one for Menu, that reference the appropriate icon for the theme.

What is the field to be modified to distinguish a command from another?
I have to change the "Item ID" field? it's correct?