How to scale Retina icons in BitmapButtons
-
On 04/09/2013 at 03:37, xxxxxxxx wrote:
User Information:
Cinema 4D Version: R15
Platform: Windows ; Mac ;
Language(s) :---------
Hi,for the R15 version of our plugin we have created icons with higher resolution to support retina displays (exactly the same sizes as in the new CINEMA 4D R15 icons). Now we have the problem that bitmapbuttons appear too big since they use the sizes of the new icons.
Currently we're using a R14 build of the plugin, where the icons get registeres like this:
RegisterIcon(ICON_ID, g_icons, 0, 0, 32, 32, (1<<2));(1<<2) is the value of ICONFLAG_2X, which doesn't seem to have any effect.
These ids are then used as the values for BITMAPBUTTON_ICONID1/2.
Is this solvable without recompiling for r15? How do we get the correct scale of the buttons?Thanks in advance!
-
On 04/09/2013 at 03:50, xxxxxxxx wrote:
Have you tried to specify the size of the bitmap button like this?
bc.SetBool(BITMAPBUTTON_BUTTON,
bc.SetLong(BITMAPBUTTON_ICONID1, RESOURCEIMAGE_AMDUPLICATE);
bc.SetBool(BITMAPBUTTON_TOGGLE, FALSE);
AddCustomGui(BTN_DUPLICATE, CUSTOMGUI_BITMAPBUTTON, "", 0, 16, 16 , bc); -
On 04/09/2013 at 04:08, xxxxxxxx wrote:
Yes just tried it, but it doesn't work. I think with this one can only make the icons bigger since it defines the minimum dimensions. The opposite would help though
-
On 04/09/2013 at 14:12, xxxxxxxx wrote:
Why don't you just use Cinemas already registered icons?
- Magnifier Glass: RESOURCEIMAGE_BROWSER_SEARCH
- Big View: RESOURCEIMAGE_BROWSER_BIGVIEW
- Small View: RESOURCEIMAGE_BROWSER_SMALLVIEWSource: <[URL-REMOVED]>
[URL-REMOVED] @maxon: This section contained a non-resolving link which has been removed.
-
On 05/09/2013 at 04:44, xxxxxxxx wrote:
Ahh thanks for the tip. Completely forgot that
This happened because previously we used a slightly modified version of bigview/smallview icons and the search option was added later.Nevertheless it would be cool to know how to support retina displays with custom icons...
-
On 07/09/2017 at 09:41, xxxxxxxx wrote:
Hi,
Is there a solution using custom registered icons?
It seems that ICONFLAG_2X still has no effect with R18, or rather the same effect than ICONFLAG_0 (no copy and no size effect).I am looking for a solution to display bitmaps for retina in a plugin dialog.
Does someone know how to do that?
-
On 11/09/2017 at 09:43, xxxxxxxx wrote:
Hi,
please check out the BaseBitmap manual (Properties), which shows how to do it for a BaseBitmap.
-
On 12/09/2017 at 03:21, xxxxxxxx wrote:
Hi Andreas,
Sorry I hadn't found this example in the documentation, thanks for the information.
It works fine!Thanks for the help.
-
On 12/09/2017 at 05:28, xxxxxxxx wrote:
No need to be sorry, that's what we are here for.