Is there a way to configure the following colors?
- Rectangle/Line drawn to indicate target area when dragging a dockable (black)
- Background color of a selected tab without focus using GlassExtension (without changing border color)
Thanks in advance.
Is there a way to configure the following colors?
Thanks in advance.
Access the “ColorManager” through “DockController#getColors()” or “CControl#intern().getController().getColors()”. Then use
cm.put( Priority.CLIENT, key, color )```
where "key" is one of the keys from below and "color" is your color. Since the glass extension is not written by me, I don't know all the keys either. So you may have to experiment a bit until you find the correct ones...
Keys for colors related to dragging:
"glass.paint.divider", "glass.paint.insertion", "glass.paint.line"
Keys for colors related to the tab:
"glass.selected.light", "glass.selected.boundary", "glass.selected.center", "glass.focused.light", "glass.focused.boundary", "glass.focused.center", "stack.tab.border.glass", "stack.tab.border.selected.glass", "stack.tab.border.selected.focused.glass", "stack.tab.border.selected.focuslost.glass", "stack.tab.top.glass", "stack.tab.top.selected.glass", "stack.tab.top.selected.focused.glass", "stack.tab.top.selected.focuslost.glass", "stack.tab.bottom.glass", "stack.tab.bottom.selected.glass", "stack.tab.bottom.selected.focused.glass", "stack.tab.bottom.selected.focuslost.glass", "stack.tab.text.glass", "stack.tab.text.selected.glass", "stack.tab.text.selected.focused.glass", "stack.tab.text.selected.focuslost.glass", "stack.border.glass"
If you are using the Common framework you may also try
```CDockable dockable = ...
dockable.getColors().setColor( ColorMap.KEY, color );```
where "KEY" is one of the keys starting with "COLOR_KEY_TAB_..."
[QUOTE=Beni]Access the “ColorManager” through “DockController#getColors()” or “CControl#intern().getController().getColors()”. Then use
cm.put( Priority.CLIENT, key, color )```
where "key" is one of the keys from below and "color" is your color. Since the glass extension is not written by me, I don't know all the keys either. So you may have to experiment a bit until you find the correct ones...
Keys for colors related to dragging:
"glass.paint.divider", "glass.paint.insertion", "glass.paint.line"[/QUOTE]
I am afraid the colors for "glass.paint.insertion" and "glass.paint.line" I tried to set in the ColorManager obtained by CControl#intern().getController().getColors() were only respected when working with the default theme and Smooth theme. When switching to the Flat theme, Eclipse theme or Eclipse theme with GlassExtension, these color settings were ignored.
The keys "glass.selected.light", "glass.selected.boundary", "glass.selected.center", "glass.focused.light", "glass.focused.boundary", "glass.focused.center" work fine.
Looks like some code does not even ask for the color. Probably this was just forgotten when the color-management switched. I’ll fix that with the next release (which will be tomorrow).
The keys will not be the same for all themes, I’ll write back once everything is repaired and tell you the missing keys.
Keys that are tested and will work in 1.1.0p5:
BasicTheme/SmoothTheme: “paint.line”, “paint.divider”, “paint.insertion”
BubbleTheme: “paint.line”, “paint.divider”, “paint.insertion”
FlatTheme: “paint.line”, “paint.divider”, “paint.insertion.area”, “paint.insertion.border”
EclipseTheme: “paint.line”, “paint.divider”, “paint.insertion” (new)
EclipseTheme (glass): “glass.paint.divider”, “glass.paint.insertion”, “glass.paint.line” (fixed)
hmmm… this might explain why all the sudden the flap button for my application has turned a nice shade of violet
I’m using core in this case and it looks like it started picking up the color from bibliothek.gui.dock.util.laf.Windows system colors.
DockController dockController = new DockController();
FlatTheme theme = new FlatTheme();
theme.setTitleFactory(new NullTitleFactory());
dockController.setTheme(theme);
Here’s my fix to revert back to original (minor enhancement in that the active is now a darker shade)
ColorManager colorManager = dockController.getColors();
Color backgroundColor = DockUI.getColor( LookAndFeelColors.PANEL_BACKGROUND );
colorManager.put(Priority.CLIENT, "title.flap.inactive", backgroundColor);
colorManager.put(Priority.CLIENT, "title.flap.inactive.text", Color.BLACK);
colorManager.put(Priority.CLIENT, "title.flap.inactive.knob.highlight", backgroundColor.brighter());
colorManager.put(Priority.CLIENT, "title.flap.inactive.knob.shadow", backgroundColor.darker());
Color activeColor = backgroundColor.darker();
colorManager.put(Priority.CLIENT, "title.flap.active", activeColor);
colorManager.put(Priority.CLIENT, "title.flap.active.text", Color.BLACK);
colorManager.put(Priority.CLIENT, "title.flap.active.knob.highlight", activeColor.brighter());
colorManager.put(Priority.CLIENT, "title.flap.active.knob.shadow", activeColor.darker());
[QUOTE=morgandev]hmmm… this might explain why all the sudden the flap button for my application has turned a nice shade of violet
I’m using core in this case and it looks like it started picking up the color from bibliothek.gui.dock.util.laf.Windows system colors.
[/QUOTE]
Yes… that was on purpose It’s actually the „selection color“ of the LookAndFeel. As you already found out, you can use your own colors