import jexer.backend.Screen;
import jexer.bits.CellAttributes;
import jexer.bits.GraphicsChars;
+import jexer.bits.StringUtils;
import jexer.event.TCommandEvent;
import jexer.event.TKeypressEvent;
import jexer.event.TMenuEvent;
true);
// Draw the title
- int titleLeft = (getWidth() - title.length() - 2) / 2;
+ int titleLength = StringUtils.width(title);
+ int titleLeft = (getWidth() - titleLength - 2) / 2;
putCharXY(titleLeft, 0, ' ', border);
- putStringXY(titleLeft + 1, 0, title);
- putCharXY(titleLeft + title.length() + 1, 0, ' ', border);
+ putStringXY(titleLeft + 1, 0, title, border);
+ putCharXY(titleLeft + titleLength + 1, 0, ' ', border);
if (isActive()) {
restoreWindowX = getX();
restoreWindowY = getY();
setWidth(getScreen().getWidth());
- setHeight(application.getDesktopBottom() - 1);
+ setHeight(application.getDesktopBottom() - application.getDesktopTop());
setX(0);
- setY(1);
+ setY(application.getDesktopTop());
maximized = true;
onResize(new TResizeEvent(TResizeEvent.Type.WIDGET, getWidth(),
* @return true if this window does not want the application-wide mouse
* cursor drawn over it
*/
- public final boolean hasHiddenMouse() {
+ public boolean hasHiddenMouse() {
return hideMouse;
}