From c1697a1ddb1aac46a357dda667fe58585359ffd6 Mon Sep 17 00:00:00 2001 From: svenhoefer Date: Sat, 20 Jan 2018 17:03:28 +0100 Subject: [PATCH] - shellwindow: fix position of button; use default color * add comment to termwindow class; correct positioning of button isn't possible atm Signed-off-by: Thilo Graf --- src/gui/widget/shellwindow.cpp | 8 ++++---- src/gui/widget/termwindow.cpp | 3 +++ 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/src/gui/widget/shellwindow.cpp b/src/gui/widget/shellwindow.cpp index 2e67e1e8d..023390d46 100644 --- a/src/gui/widget/shellwindow.cpp +++ b/src/gui/widget/shellwindow.cpp @@ -226,7 +226,7 @@ void CShellWindow::exec() if (mode & VERBOSE) { txt = lines2txt(lines); - txt += "\n...ready"; + txt += "\n... ready"; textBox->setText(&txt, textBox->getWindowsPos().iWidth, false); } @@ -274,10 +274,10 @@ void CShellWindow::showResult() if (show_button){ int b_width = 150; int b_height = 35; - int xpos = frameBuffer->getScreenWidth() - b_width; - int ypos = frameBuffer->getScreenHeight() - b_height; + int xpos = frameBuffer->getScreenX() + frameBuffer->getScreenWidth() - OFFSET_INNER_MID - b_width; + int ypos = frameBuffer->getScreenY() + frameBuffer->getScreenHeight() - OFFSET_INNER_SMALL - b_height; CComponentsButton btn(xpos, ypos, b_width, b_height, LOCALE_MESSAGEBOX_BACK, NEUTRINO_ICON_BUTTON_OKAY, NULL, true, true); - btn.setColorBody(COL_MENUCONTENT_PLUS_0); + //btn.setColorBody(COL_MENUCONTENT_PLUS_0); btn.paint(false); } diff --git a/src/gui/widget/termwindow.cpp b/src/gui/widget/termwindow.cpp index bc67d3e77..d5fc02d8d 100644 --- a/src/gui/widget/termwindow.cpp +++ b/src/gui/widget/termwindow.cpp @@ -97,6 +97,9 @@ void CTermWindow::showResult() if (show_button) { int b_width = 150; int b_height = 35; + /* + we need the dimensions of yaft window to place the button correctly + */ int xpos = frameBuffer->getScreenWidth() - b_width; int ypos = frameBuffer->getScreenHeight() - b_height; CComponentsButton btn(xpos, ypos, b_width, b_height, LOCALE_MESSAGEBOX_BACK, NEUTRINO_ICON_BUTTON_OKAY, NULL, true, true);