Closed GoogleCodeExporter closed 9 years ago
Oops. Patch for GUIScreen is incorrect. This is better...
@@ -19,6 +19,7 @@
package com.googlecode.lanterna.gui;
+import com.googlecode.lanterna.gui.Theme.Definition;
import com.googlecode.lanterna.gui.listener.WindowAdapter;
import com.googlecode.lanterna.input.Key;
import com.googlecode.lanterna.screen.Screen;
@@ -180,11 +181,17 @@
new TerminalSize(preferredSize.getColumns(), preferredSize.getRows()));
//First draw the shadow
-
textGraphics.applyTheme(guiTheme.getDefinition(Theme.Category.SHADOW));
- textGraphics.fillRectangle(' ', new
TerminalPosition(topLeft.getColumn() + 2, topLeft.getRow() + 1),
- new TerminalSize(subGraphics.getWidth(),
subGraphics.getHeight()));
-
- //Then draw the window
+ if (guiTheme.hasDefinition(Theme.Category.SHADOW)) {
+ Definition shadowDef =
guiTheme.getDefinition(Theme.Category.SHADOW);
+ textGraphics.applyTheme(shadowDef);
+ textGraphics.fillRectangle(
+ ' ',
+ new TerminalPosition(topLeft.getColumn() + 2, topLeft
+ .getRow() + 1),
+ new TerminalSize(subGraphics.getWidth(), subGraphics
+ .getHeight()));
+ }
+ //Then draw the window
windowPlacement.getWindow().repaint(subGraphics);
}
Original comment by kitz...@gmail.com
on 12 May 2014 at 1:07
Well, the theme system in 2.x is pretty useless as it is, I think we can just
add a new property to either GUISystem or Window, to set if the shadow should
be rendered or not.
For 3.x, I hope to have come up with a better solution altogether.
Original comment by mab...@gmail.com
on 8 Jun 2014 at 12:58
I've added Window.setDrawShadow(..) on the release/2.1 branch. Please give it a
try if you can.
Original comment by mab...@gmail.com
on 9 Jun 2014 at 1:17
Original issue reported on code.google.com by
kitz...@gmail.com
on 12 May 2014 at 12:48