Ecere Software
/
sdk
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c3fad6c
)
ecere/gui/Label: Tweak for label to only auto-size (OnResizing) for the dimension...
author
Jerome St-Louis
<jerome@ecere.com>
Wed, 1 Aug 2012 02:44:56 +0000
(22:44 -0400)
committer
Jerome St-Louis
<jerome@ecere.com>
Wed, 1 Aug 2012 02:44:56 +0000
(22:44 -0400)
ecere/src/gui/controls/Label.ec
patch
|
blob
|
history
diff --git
a/ecere/src/gui/controls/Label.ec
b/ecere/src/gui/controls/Label.ec
index
f0726c2
..
8e8ac0b
100644
(file)
--- a/
ecere/src/gui/controls/Label.ec
+++ b/
ecere/src/gui/controls/Label.ec
@@
-83,11
+83,15
@@
private:
int width = 0, height = 0;
display.FontExtent(fontObject, string, strlen(string), &width, &height);
- if(labeledWindow && labeledWindow.text)
- *w = Max(width, *w);
- else
- *w = Max(width, 80);
- *h = Max(height, *h);
+ if(!*w)
+ {
+ if(labeledWindow && labeledWindow.text)
+ *w = Max(width, *w);
+ else
+ *w = Max(width, 80);
+ }
+ if(!*h)
+ *h = Max(height, *h);
}
return true;
}