Message Boards Message Boards

2
|
2413 Views
|
5 Replies
|
5 Total Likes
View groups...
Share
Share this post:

ColorSetter inner margins in version 13.2

In version 13.2 the inner padding of ColorSetter changed. Does anyone know a hidden setting to allow changing this? I use it on many occasions but always with ImageSize->20. But with that spec the setter does not work anymore.

Grid[Table[
  ColorSetter[Pink, ImageSize -> {w, h}], {h, Range[20, 50, 5]}, {w, 
   Range[20, 50, 5]}]]

gives this as result, where most of the top three rows and left two columns don't work.

enter image description here

POSTED BY: Martijn Froeling
5 Replies
Posted 1 year ago

I see the same as Martijn, on Windows 11

POSTED BY: Hans Milton

What are your system specs? I do not see things like that on Mac OS.

POSTED BY: Sam Carrettie

Im runnig Windows 10 Enterprise.

POSTED BY: Martijn Froeling

Still curious if anyone has an elegant solution for this. This has broken all my interfaces. Since also the ColorSlider is affected. (left 13.1 right 13.2)

Table[ColorSlider[Red, ImageSize -> {w, h}], {h, 5, 55, 5}, {w, 50, 
   250, 50}] // Grid

Grid[Table[
  ColorSetter[Red, ImageSize -> {w, h}, BaseStyle -> {Blue}], {h, 5, 
   45, 5}, {w, 5, 45, 5}]]

enter image description here

As a workaround i wrote some code that makes a button that acts like a ColorSetter

col1 = Red;
Button[
 Dynamic[Graphics[{col1, Rectangle[]}, ImageSize -> {20, 20}]],
 new = SystemDialogInput["Color", col1];
 col1 = If[new === $Canceled, col1, new];,
 Background -> White, Method -> "Queued", FrameMargins -> 0, 
 Appearance -> "Frameless"]

Not The most elegant solution but works in Manipulate just like a ColorSetter.

Manipulate[
 {col1, col2},
 Control[{
   {col1, Blue, "color 1"}, Button[
     Dynamic[Graphics[{col1, Rectangle[]}, ImageSize -> {20, 20}]],
     new = SystemDialogInput["Color", #];
     col1 = If[new === $Canceled, col1, new];
     , Background -> White, Method -> "Queued", FrameMargins -> 0, 
     Appearance -> "Frameless"] &
   }],
 Control[{
   {col2, Red, "color 2"},
   ColorSetter[#, ImageSize -> {50, 50}] &
   }]
 ]

enter image description here

POSTED BY: Martijn Froeling

Thanks! This is fixed in version 13.2.1 as far as I can see.

POSTED BY: Martijn Froeling
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract