mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
add experimental editor's thumb on windows
This commit is contained in:
@@ -71,9 +71,41 @@ class ScrollPainter extends RegionPainter.Alpha {
|
||||
}
|
||||
|
||||
static final class EditorThumb {
|
||||
static final RegionPainter<Float> DARCULA = new ScrollPainter(0, .33f, .12f, Gray.xA6, Gray.x1A);
|
||||
static final RegionPainter<Float> DEFAULT = new Protected(new SubtractColor(0, .25f, .15f, Gray.x80, Gray.xA6),
|
||||
new ScrollPainter(0, .25f, .15f, Gray.x80, Gray.x59));
|
||||
private static final RegionPainter<Float> DARCULA_OLD = new ScrollPainter(0, .33f, .12f, Gray.xA6, Gray.x1A);
|
||||
private static final RegionPainter<Float> DARCULA_NEW = new EditorThumbPainter(
|
||||
1,
|
||||
value("win.editor.thumb.darcula.alpha.base", 89),
|
||||
value("win.editor.thumb.darcula.alpha.delta", 166),
|
||||
new ColorFunction(
|
||||
value("win.editor.thumb.darcula.color.min", 0x8C),
|
||||
value("win.editor.thumb.darcula.color.max", 0xA1)),
|
||||
gray("win.editor.thumb.darcula.border", 0x1F));
|
||||
|
||||
private static final RegionPainter<Float> DEFAULT_OLD = new Protected(new SubtractColor(0, .25f, .15f, Gray.x80, Gray.xA6),
|
||||
new ScrollPainter(0, .25f, .15f, Gray.x80, Gray.x59));
|
||||
private static final RegionPainter<Float> DEFAULT_NEW = new EditorThumbPainter(
|
||||
2,
|
||||
value("win.editor.thumb.default.alpha.base", 140),
|
||||
value("win.editor.thumb.default.alpha.delta", 115),
|
||||
new ColorFunction(
|
||||
value("win.editor.thumb.default.color.min", 0x9E),
|
||||
value("win.editor.thumb.default.color.max", 0xBD)),
|
||||
gray("win.editor.thumb.default.border", 0x8C));
|
||||
|
||||
static final RegionPainter<Float> DARCULA = new RegionPainter<Float>() {
|
||||
@Override
|
||||
public void paint(Graphics2D g, int x, int y, int width, int height, Float value) {
|
||||
RegionPainter<Float> painter = Registry.is("ide.editor.thumb.experimental") ? DARCULA_NEW : DARCULA_OLD;
|
||||
painter.paint(g, x, y, width, height, value);
|
||||
}
|
||||
};
|
||||
static final RegionPainter<Float> DEFAULT = new RegionPainter<Float>() {
|
||||
@Override
|
||||
public void paint(Graphics2D g, int x, int y, int width, int height, Float value) {
|
||||
RegionPainter<Float> painter = Registry.is("ide.editor.thumb.experimental") ? DEFAULT_NEW : DEFAULT_OLD;
|
||||
painter.paint(g, x, y, width, height, value);
|
||||
}
|
||||
};
|
||||
|
||||
static final class Mac {
|
||||
private static final RegionPainter<Float> DARCULA_OLD = new Round(1, .35f, .20f, xA6, x0D);
|
||||
|
||||
@@ -177,6 +177,36 @@ mac.editor.thumb.default.alpha.base.description=Allows to tune an experimental t
|
||||
mac.editor.thumb.default.alpha.delta=153
|
||||
mac.editor.thumb.default.alpha.delta.description=Allows to tune an experimental thumb color in the editor component.
|
||||
|
||||
win.editor.thumb.darcula.border=31
|
||||
win.editor.thumb.darcula.border.description=Allows to tune an experimental thumb border in the editor component.
|
||||
|
||||
win.editor.thumb.darcula.color.min=140
|
||||
win.editor.thumb.darcula.color.min.description=Allows to tune an experimental thumb color in the editor component.
|
||||
|
||||
win.editor.thumb.darcula.color.max=161
|
||||
win.editor.thumb.darcula.color.max.description=Allows to tune an experimental thumb color in the editor component.
|
||||
|
||||
win.editor.thumb.darcula.alpha.base=89
|
||||
win.editor.thumb.darcula.alpha.base.description=Allows to tune an experimental thumb color in the editor component.
|
||||
|
||||
win.editor.thumb.darcula.alpha.delta=166
|
||||
win.editor.thumb.darcula.alpha.delta.description=Allows to tune an experimental thumb color in the editor component.
|
||||
|
||||
win.editor.thumb.default.border=140
|
||||
win.editor.thumb.default.border.description=Allows to tune an experimental thumb border in the editor component.
|
||||
|
||||
win.editor.thumb.default.color.min=158
|
||||
win.editor.thumb.default.color.min.description=Allows to tune an experimental thumb color in the editor component.
|
||||
|
||||
win.editor.thumb.default.color.max=189
|
||||
win.editor.thumb.default.color.max.description=Allows to tune an experimental thumb color in the editor component.
|
||||
|
||||
win.editor.thumb.default.alpha.base=140
|
||||
win.editor.thumb.default.alpha.base.description=Allows to tune an experimental thumb color in the editor component.
|
||||
|
||||
win.editor.thumb.default.alpha.delta=115
|
||||
win.editor.thumb.default.alpha.delta.description=Allows to tune an experimental thumb color in the editor component.
|
||||
|
||||
mac.scroll.thumb.darcula.color=166
|
||||
mac.scroll.thumb.darcula.color.description=Allows to tune a thumb color in the editor component.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user