summaryrefslogtreecommitdiff
path: root/src/PSEditWidget.cxx
diff options
context:
space:
mode:
authorJohannes Hofmann <johannes.hofmann@gmx.de>2005-02-03 17:10:17 +0000
committerJohannes Hofmann <johannes.hofmann@gmx.de>2005-02-03 17:10:17 +0000
commit0d8e5df811a61e045d0a097979c9c44bfc26e61d (patch)
tree21e3ffd03a713064bf56e4b7e1c8d3a4002248b4 /src/PSEditWidget.cxx
parenta277b07d552f40958243d739d2be081571015885 (diff)
fixes
fixes
Diffstat (limited to 'src/PSEditWidget.cxx')
-rw-r--r--src/PSEditWidget.cxx22
1 files changed, 15 insertions, 7 deletions
diff --git a/src/PSEditWidget.cxx b/src/PSEditWidget.cxx
index 7476ce7..46a6c1c 100644
--- a/src/PSEditWidget.cxx
+++ b/src/PSEditWidget.cxx
@@ -1,5 +1,5 @@
//
-// "$Id: PSEditWidget.cxx,v 1.34 2005/02/02 16:49:12 hofmann Exp $"
+// "$Id: PSEditWidget.cxx,v 1.35 2005/02/03 18:10:17 hofmann Exp $"
//
// PSEditWidget routines.
//
@@ -328,13 +328,26 @@ int PSEditWidget::bb_w(PSEditText *t) {
tag = t->get_tag();
if (tag) {
- fl_font(FLPSED_TAG_FONT, FLPSED_TAG_FONT_SIZE);
+ fl_font(FLPSED_TAG_FONT, FLPSED_TAG_FONT_SIZE * zoom_percent / 100);
wt = (int) fl_width(tag) + 20;
}
return w>=wt?w:wt;
}
+int PSEditWidget::bb_h(PSEditText *t) {
+ int ret;
+ fl_font(FLPSED_FONT, t->get_size() * zoom_percent / 100);
+ ret = fl_height() + 30;
+
+ if (t->get_tag()) {
+ fl_font(FLPSED_TAG_FONT, FLPSED_TAG_FONT_SIZE * zoom_percent / 100);
+ ret = ret + fl_height();
+ }
+
+ return ret;
+}
+
static int round_div(int a, int b) {
int r;
@@ -346,11 +359,6 @@ static int round_div(int a, int b) {
return r;
}
-int PSEditWidget::bb_h(PSEditText *t) {
- fl_font(FLPSED_FONT, t->get_size() * zoom_percent / 100);
- return fl_height() + 30;
-}
-
int PSEditWidget::ps_to_display_x(int x1) {
return round_div(x1 * xdpi, 72);
}