Patch level :2.0 aga nopatch
Files correlati :libs Ricompilazione Demo : [ ] Commento :sistemato il bottone pentapartito git-svn-id: svn://10.65.10.50/trunk@10835 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
723d587c66
commit
9fe90a1062
@ -129,29 +129,27 @@ void TRelation_application::set_limits(
|
|||||||
|
|
||||||
void TRelation_application::set_find_button()
|
void TRelation_application::set_find_button()
|
||||||
{
|
{
|
||||||
|
|
||||||
int pos = _mask->id2pos(DLG_FINDREC);
|
int pos = _mask->id2pos(DLG_FINDREC);
|
||||||
if (pos >= 0)
|
if (pos >= 0 && _mask->id2pos(DLG_FIRSTREC)) //se e' un bottone pentapartito...
|
||||||
{
|
{
|
||||||
RCT rct_base, r;
|
|
||||||
TButton_field& f_find = (TButton_field &)_mask->fld(pos);
|
TButton_field& f_find = (TButton_field &)_mask->fld(pos);
|
||||||
|
RCT rct_base, r;
|
||||||
TString16 p(f_find.prompt());
|
|
||||||
if (p == "~c.")
|
|
||||||
return;
|
|
||||||
f_find.get_rect(rct_base);
|
f_find.get_rect(rct_base);
|
||||||
|
const int bwidth = (rct_base.right - rct_base.left);
|
||||||
|
const int bheight = (rct_base.bottom - rct_base.top);
|
||||||
|
if (bwidth > 3*bheight/2) // Controllo se ho gia' ridimensionato i bottoni in precedenza
|
||||||
|
{
|
||||||
|
int bx = bwidth / 3;
|
||||||
|
int by = bheight / 2;
|
||||||
|
|
||||||
int bx = (rct_base.right - rct_base.left) / 3;
|
r = rct_base; r.left += bx; r.right -= bx;
|
||||||
int by = (rct_base.bottom - rct_base.top) / 2;
|
f_find.set_rect(r); // Ridimensiona il bottone centrale di ricerca
|
||||||
|
|
||||||
|
bx += 4; by += 2; // Aggiusta dimensioni botoni sussidiari
|
||||||
|
|
||||||
pos = _mask->id2pos(DLG_FIRSTREC);
|
pos = _mask->id2pos(DLG_FIRSTREC);
|
||||||
if (pos >= 0)
|
if (pos >= 0)
|
||||||
{
|
{
|
||||||
r = rct_base; r.left += bx; r.right -= bx;
|
|
||||||
f_find.set_prompt("~c.");
|
|
||||||
f_find.set_rect(r);
|
|
||||||
bx += 4;
|
|
||||||
by += 2;
|
|
||||||
r = rct_base; r.top = r.bottom - by; r.right = r.left + bx;
|
r = rct_base; r.top = r.bottom - by; r.right = r.left + bx;
|
||||||
_mask->fld(pos).set_rect(r);
|
_mask->fld(pos).set_rect(r);
|
||||||
}
|
}
|
||||||
@ -175,6 +173,7 @@ void TRelation_application::set_find_button()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
bool TRelation_application::create()
|
bool TRelation_application::create()
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user