Make Terminal operate on and cache colors instead of RGB values#2481
Make Terminal operate on and cache colors instead of RGB values#2481HeikoKlare merged 1 commit intoeclipse-platform:masterfrom
Conversation
| RGB rgb = null; | ||
| if (fPreferenceStore != null) { | ||
| try { | ||
| rgb = StringConverter.asRGB( |
There was a problem hiding this comment.
should this here not be an color already?
There was a problem hiding this comment.
It's an RGB value that is later wrapped into a color.
| @@ -694,7 +695,7 @@ | |||
| if (rgb == null) { | |||
| rgb = TerminalColorPresets.INSTANCE.getDefaultPreset().getRGB(terminalColor); | |||
| Color defaultFg = fStyleMap.getForegroundColor(null); | ||
| doubleBufferGC.setForeground(defaultFg); |
There was a problem hiding this comment.
as we have Color getDefaultBackgroundColor() should the not better be a Color getForegroundColor() as well?
This would prevent repeating the code used here and in setupGC
There was a problem hiding this comment.
It's not a repetition as here it's about the default color (style == null) and in setupGC its the style-specific color. We can of course introduce additional methods like getDefaultForegroundColor() or the like, but it's will only be for consistency, not for reuse.
860b9f4 to
6e26c24
Compare
|
This pull request changes some projects for the first time in this development cycle. Warning 🚧 This PR cannot be modified by maintainers because edits are disabled or it is created from an organization repository. To obtain the required changes apply the git patch manually as an additional commit. Git patchFurther information are available in Common Build Issues - Missing version increments. |
32e9db2 to
7319f1b
Compare
# Conflicts: # terminal/bundles/org.eclipse.terminal.control/src/org/eclipse/terminal/internal/textcanvas/TextLineRenderer.java
7319f1b to
6f9f2ef
Compare
No description provided.