Patch level : 10.0

Files correlati     : lv3
Ricompilazione Demo : [ ]
Commento            :
Corretto calcolo altezza barra strumenti su terminalino


git-svn-id: svn://10.65.10.50/trunk@19699 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
guy 2009-12-01 16:22:38 +00:00
parent 052f240b78
commit a1a3faddf7
3 changed files with 15 additions and 14 deletions

View File

@ -204,9 +204,6 @@ XVT_FNTID xvtil_default_font(bool bold, bool big)
TString font_ser_desc = font.get("FontDesc"); // Modernamente e' nel paragrafo Colors
int interline = font.get_int("InterLine", NULL, -1, -1);
if (font_ser_desc.empty())
font_ser_desc = font.get("FontDesc", "Font"); // Anticamente era nel paragrafo Font
if (font_ser_desc.empty())
{
const char* name = "Verdana";
@ -889,7 +886,7 @@ XI_RCT TControl::coord2rct(XI_OBJ* itf, short x, short y, short dx, short dy) co
if (dx > 0)
width = dx * CHARX;
int height = CHARY + (ROWY-CHARY+1)/2;
int height = CHARY;
if (dy > 1)
height += (dy-1) * ROWY;
@ -1536,7 +1533,7 @@ void TButton_control::create(WINDOW win, short cid,
if (height == 1)
{
XI_RCT& r = _obj->v.btn->rct;
r.top--;
// r.top--; Commentata di recente
}
break;
case WC_CHECKBUTTON:
@ -1549,7 +1546,7 @@ void TButton_control::create(WINDOW win, short cid,
break;
case WC_CHECKBOX:
case WC_RADIOBUTTON:
{
{
XI_RCT& r = _obj->v.btn->rct;
r.top++; r.bottom -= 2;
r.right += XI_FU_MULTIPLE / 2;
@ -1871,7 +1868,7 @@ TRadiobutton_control::TRadiobutton_control(WINDOW win, short cid,
rct.left -= XI_FU_MULTIPLE / 4;
rct.right += XI_FU_MULTIPLE / 4;
}
XI_OBJ_DEF* def = xi_add_container_def(NULL, cid, (XI_RCT*) &rct, orient, cid);
XI_OBJ_DEF* def = xi_add_container_def(NULL, cid, &rct, orient, cid);
def->app_data = (long)this;
const unsigned long attrib = flags2attr(flags);

View File

@ -1147,7 +1147,7 @@ void TMask::read_page(
if (is_toolbar)
{
if (r.top > 15) // Rendi negative le coordinate delle toolbar per ...
r.top -= 23; // ... ottimizzare l'uso dello schermo ad alta risoluzione
r.top -= MAX_MASK_ROWS; // ... ottimizzare l'uso dello schermo ad alta risoluzione
}
}
@ -1263,6 +1263,7 @@ WINDOW TMask::create_book(bool single)
if (single)
{
CHECK(_single == NULL_WIN, "One single page pane, please!");
CHECK(_notebook == NULL_WIN, "Single and notebook?");
_single = create_interface(parent, 0, 0, 0, 0, "", this);
xvt_pane_add(parent, _single, "_MainSingle_", 0, 0);
_pagewin[0] = _single;
@ -1271,6 +1272,7 @@ WINDOW TMask::create_book(bool single)
else
{
CHECK(_notebook == NULL_WIN, "One single notebook, please!");
CHECK(_single == NULL_WIN, "Notebook and Single?");
XVT_COLOR_COMPONENT xcc[4]; memset(xcc, 0, sizeof(xcc));
xcc[0].type = XVT_COLOR_BACKGROUND; xcc[0].color = MASK_BACK_COLOR;
xcc[1].type = XVT_COLOR_FOREGROUND; xcc[1].color = NORMAL_COLOR;
@ -1320,9 +1322,9 @@ void TMask::insert_bar(WINDOW page)
{
CHECK(_toolbar == NULL_WIN, "One single top bar, please!");
RCT t; xvt_vobj_get_client_rect(TASK_WIN, &t);
RCT r; xvt_vobj_get_client_rect(win(), &r);
const int nrows = r.bottom / ROWY;
if (nrows < 18) // Ridimensiono maschera piccola (non massimizzata)
if (r.bottom < t.bottom-2*ROWY) // Ridimensiono maschera piccola (non massimizzata)
{
const short bar_height = max(rct_bar.bottom - rct_bar.top, TOOL_SIZE + TOOL_TEXT * 12 + 12);
RCT rct_new; xvt_vobj_get_client_rect(parent, &rct_new);

View File

@ -85,7 +85,7 @@ RCT& resize_rect(
if (ROWY <= 0) // Not yet initialized
{
const PNT tws = xvtil_taskwin_size();
ROWY = tws.v / min(23, tws.v / CHARY);
ROWY = tws.v / min(MAX_MASK_ROWS, tws.v / CHARY);
}
}
@ -127,7 +127,11 @@ RCT& resize_rect(
if (parent == NULL_WIN) parent = TASK_WIN;
xvt_vobj_get_client_rect(parent, &pc); // Get parent window size
if (parent == TASK_WIN)
pc.bottom -= 26; // Cazzone???
{
int sbh = xvtil_statbar_height();
if (sbh <= 0) sbh = 22;
pc.bottom -= (sbh+2);
}
const short MAXX = pc.right;
const short MAXY = pc.bottom;
@ -175,9 +179,7 @@ RCT& resize_rect(
if (dy <= 0)
r.bottom = MAXY + dy*ROWY;
else
{
r.bottom += r.top;
}
}
else
{