- 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 <dbt@novatux.de>
This commit is contained in:
svenhoefer
2018-01-20 17:03:28 +01:00
committed by Thilo Graf
parent 3b907d739f
commit c1697a1ddb
2 changed files with 7 additions and 4 deletions

View File

@@ -274,10 +274,10 @@ void CShellWindow::showResult()
if (show_button){ if (show_button){
int b_width = 150; int b_width = 150;
int b_height = 35; int b_height = 35;
int xpos = frameBuffer->getScreenWidth() - b_width; int xpos = frameBuffer->getScreenX() + frameBuffer->getScreenWidth() - OFFSET_INNER_MID - b_width;
int ypos = frameBuffer->getScreenHeight() - b_height; 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); 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); btn.paint(false);
} }

View File

@@ -97,6 +97,9 @@ void CTermWindow::showResult()
if (show_button) { if (show_button) {
int b_width = 150; int b_width = 150;
int b_height = 35; int b_height = 35;
/*
we need the dimensions of yaft window to place the button correctly
*/
int xpos = frameBuffer->getScreenWidth() - b_width; int xpos = frameBuffer->getScreenWidth() - b_width;
int ypos = frameBuffer->getScreenHeight() - b_height; int ypos = frameBuffer->getScreenHeight() - b_height;
CComponentsButton btn(xpos, ypos, b_width, b_height, LOCALE_MESSAGEBOX_BACK, NEUTRINO_ICON_BUTTON_OKAY, NULL, true, true); CComponentsButton btn(xpos, ypos, b_width, b_height, LOCALE_MESSAGEBOX_BACK, NEUTRINO_ICON_BUTTON_OKAY, NULL, true, true);