summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMichael R Sweet <michael.r.sweet@gmail.com>2005-05-12 14:31:45 +0000
committerMichael R Sweet <michael.r.sweet@gmail.com>2005-05-12 14:31:45 +0000
commite4a481785d8007dc6e0d2a9666da7b61a45f9934 (patch)
treeee43e044e74c6503e217c1468a4592a3b019857e /src
parentbce23d108a5ab76022d3c3884b69567039fb204a (diff)
Fix drawing of non-square round boxes.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4333 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src')
-rw-r--r--src/fl_plastic.cxx14
1 files changed, 10 insertions, 4 deletions
diff --git a/src/fl_plastic.cxx b/src/fl_plastic.cxx
index 75b0bbc5f..a3c1cbe1f 100644
--- a/src/fl_plastic.cxx
+++ b/src/fl_plastic.cxx
@@ -265,8 +265,11 @@ static void thin_up_box(int x, int y, int w, int h, Fl_Color c) {
static void up_round(int x, int y, int w, int h, Fl_Color c) {
- shade_round(x + 1, y + 1, w - 2, h - 3, "RVQNOPQRSTUVWVQ", c);
- frame_round(x, y, w, h - 1, "IJLM", c);
+ if (w != h) up_box(x, y, w, h, c);
+ else {
+ shade_round(x + 1, y + 1, w - 2, h - 3, "RVQNOPQRSTUVWVQ", c);
+ frame_round(x, y, w, h - 1, "IJLM", c);
+ }
}
@@ -282,8 +285,11 @@ static void down_box(int x, int y, int w, int h, Fl_Color c) {
static void down_round(int x, int y, int w, int h, Fl_Color c) {
- shade_round(x + 2, y + 2, w - 4, h - 5, "STUVWWWVT", c);
- frame_round(x, y, w, h - 1, "MLJI", c);
+ if (w != h) down_box(x, y, w, h, c);
+ else {
+ shade_round(x + 2, y + 2, w - 4, h - 5, "STUVWWWVT", c);
+ frame_round(x, y, w, h - 1, "MLJI", c);
+ }
}