summaryrefslogtreecommitdiff
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
parenta277b07d552f40958243d739d2be081571015885 (diff)
fixes
fixes
-rw-r--r--src/PSEditWidget.cxx22
-rw-r--r--src/flpsed.cxx6
2 files changed, 18 insertions, 10 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);
}
diff --git a/src/flpsed.cxx b/src/flpsed.cxx
index c8e37a2..c3e13e0 100644
--- a/src/flpsed.cxx
+++ b/src/flpsed.cxx
@@ -1,5 +1,5 @@
//
-// "$Id: flpsed.cxx,v 1.29 2005/02/02 19:24:37 hofmann Exp $"
+// "$Id: flpsed.cxx,v 1.30 2005/02/03 18:10:17 hofmann Exp $"
//
// flpsed program.
//
@@ -89,7 +89,7 @@ void import_pdf_cb() {
int ret;
char cmd[1000];
- snprintf(cmd, sizeof(cmd), "pdftops %s -", file);
+ snprintf(cmd, sizeof(cmd), "pdftops \"%s\" -", file);
p = popen(cmd, "r");
if (p) {
psed_p->load(p);
@@ -114,7 +114,7 @@ void export_pdf_cb() {
int ret;
char cmd[1000];
- snprintf(cmd, sizeof(cmd), "ps2pdf - %s", file);
+ snprintf(cmd, sizeof(cmd), "ps2pdf - \"%s\"", file);
p = popen(cmd, "w");
if (p) {
psed_p->save(p);