FLTK logo

[Library] r9042 - branches/branch-3.0/src/fltk3

FLTK matrix user chat room
(using Element browser app)   FLTK gitter user chat room   GitHub FLTK Project   FLTK News RSS Feed  
  FLTK Apps      FLTK Library      Forums      Links     Login 
 All Forums  |  Back to fltk.commit  ]
 
Previous Message ]Next Message ]

[Library] r9042 - branches/branch-3.0/src/fltk3 fltk-dev Sep 16, 2011  
 
Author: matt
Date: 2011-09-16 15:10:14 -0700 (Fri, 16 Sep 2011)
New Revision: 9042
Log:
Changed Choice design a little bit as well - still not happy.

Modified:
   branches/branch-3.0/src/fltk3/Choice.cxx
   branches/branch-3.0/src/fltk3/MenuButton.cxx

Modified: branches/branch-3.0/src/fltk3/Choice.cxx
===================================================================
--- branches/branch-3.0/src/fltk3/Choice.cxx	2011-09-16 21:30:05 UTC (rev 9041)
+++ branches/branch-3.0/src/fltk3/Choice.cxx	2011-09-16 22:10:14 UTC (rev 9042)
@@ -70,11 +70,11 @@
     }
   } else {
     if (fltk3::contrast(textcolor(), fltk3::BACKGROUND2_COLOR) == textcolor()) {
-      draw_box(fltk3::DOWN_BOX, fltk3::BACKGROUND2_COLOR);
+      draw_box(Boxtype(DOWN_BOX|TIE_RIGHT), x(), y(), X-x(), h(), fltk3::BACKGROUND2_COLOR);
     } else {
-      draw_box(fltk3::DOWN_BOX, fltk3::lighter(color()));
+      draw_box(Boxtype(DOWN_BOX|TIE_RIGHT), x(), y(), X-x(), h(), fltk3::lighter(color()));
     }
-    draw_box(fltk3::UP_BOX,X,Y,W,H,color());
+    draw_box(Boxtype(fltk3::UP_BOX|TIE_LEFT),X,y(),w()+x()-X,h(),color());
 
     fltk3::color(active_r() ? labelcolor() : fltk3::inactive(labelcolor()));
     fltk3::polygon(x1, y1, x1 + w1, y1 + w1, x1 + 2 * w1, y1);

Modified: branches/branch-3.0/src/fltk3/MenuButton.cxx
===================================================================
--- branches/branch-3.0/src/fltk3/MenuButton.cxx	2011-09-16 21:30:05 UTC (rev 9041)
+++ branches/branch-3.0/src/fltk3/MenuButton.cxx	2011-09-16 22:10:14 UTC (rev 9042)
@@ -36,13 +36,13 @@
 void fltk3::MenuButton::draw() {
   FLTK3_OBJECT_VCALLS_WRAPPER(draw(), Draw)
   if (!box() || type()) return;
+  int H = (labelsize()-3)&-2;
+  int X = x()+w()-H*2;
+  int Y = y()+(h()-H)/2;
   draw_box(pressed_menu_button_ == this ? fltk3::down(box()) : box(), color());
-  draw_label();
+  draw_label(x(), y(), X-x(), h());
   if (fltk3::focus() == this) draw_focus();
   // ** if (box() == fltk3::FLAT_BOX) return; // for XForms compatibility
-  int H = (labelsize()-3)&-2;
-  int X = x()+w()-H*2;
-  int Y = y()+(h()-H)/2;
   fltk3::color(active_r() ? fltk3::DARK3 : fltk3::inactive(fltk3::DARK3));
   fltk3::line(X+H/2, Y+H, X, Y, X+H, Y);
   fltk3::color(active_r() ? fltk3::LIGHT3 : fltk3::inactive(fltk3::LIGHT3));

Direct Link to Message ]
 
     
Previous Message ]Next Message ]
 
 

Comments are owned by the poster. All other content is copyright 1998-2024 by Bill Spitzak and others. This project is hosted by The FLTK Team. Please report site problems to 'erco@seriss.com'.