Author: matt
Date: 2011-07-10 09:56:39 -0700 (Sun, 10 Jul 2011)
New Revision: 8848
Log:
123: fixed Fluid hierarchical view
Modified:
branches/branch-3.0/fluid/Fl_Type.cxx
branches/branch-3.0/test1/demo.cxx
branches/branch-3.0/test1/demo.menu
Modified: branches/branch-3.0/fluid/Fl_Type.cxx
===================================================================
--- branches/branch-3.0/fluid/Fl_Type.cxx 2011-07-04 15:57:30 UTC (rev
8847)
+++ branches/branch-3.0/fluid/Fl_Type.cxx 2011-07-10 16:56:39 UTC (rev
8848)
@@ -288,11 +288,12 @@
if (l->new_selected)
fltk3::color(fltk3::contrast(fltk3::FOREGROUND_COLOR,fltk3::SELECTION_COLOR));
else fltk3::color(fltk3::FOREGROUND_COLOR);
fltk3::Pixmap *pm = pixmap[l->pixmapID()];
- if (pm) pm->draw(X-18, Y);
+ if (pm) pm->draw(X-18+11, Y);
switch (l->is_public()) {
- case 0: lock_pixmap.draw(X - 17, Y); break;
- case 2: protected_pixmap.draw(X - 17, Y); break;
+ case 0: lock_pixmap.draw(X-17+11, Y); break;
+ case 2: protected_pixmap.draw(X-17+11, Y); break;
}
+ X -= 18;
if (l->is_parent()) {
if (!l->next || l->next->level <= l->level) {
if (l->open_!=(l==pushedtitle)) {
@@ -307,8 +308,9 @@
fltk3::polygon(X+2,Y+2,X+7,Y+7,X+2,Y+12);
}
}
- X += 10;
}
+ X += 10;
+ X += 18;
Y += comment_incr;
if (l->is_widget() || l->is_class()) {
const char* c = subclassname(l);
@@ -409,7 +411,7 @@
l = (Fl_Type*)find_item(fltk3::event_y());
if (l) {
X += 12*l->level + 18 - hposition();
- if (l->is_parent() && fltk3::event_x()>X && fltk3::event_x()<X+13) {
+ if (l->is_parent() && fltk3::event_x()>X-18 && fltk3::event_x()<X+13-18)
{
title = pushedtitle = l;
redraw_line(l);
return 1;
@@ -421,7 +423,7 @@
l = (Fl_Type*)find_item(fltk3::event_y());
if (l) {
X += 12*l->level + 18 - hposition();
- if (l->is_parent() && fltk3::event_x()>X && fltk3::event_x()<X+13) ;
+ if (l->is_parent() && fltk3::event_x()>X-18 && fltk3::event_x()<X+13-18)
;
else l = 0;
}
if (l != pushedtitle) {
Modified: branches/branch-3.0/test1/demo.cxx
===================================================================
--- branches/branch-3.0/test1/demo.cxx 2011-07-04 15:57:30 UTC (rev 8847)
+++ branches/branch-3.0/test1/demo.cxx 2011-07-10 16:56:39 UTC (rev 8848)
@@ -303,7 +303,7 @@
if (arg) {
*arg = 0;
- if (strcmp(cmd, "../fluid/fluid")==0) {
+ if (strcmp(cmd, "../fluid1/fluid")==0) {
fl_filename_absolute(path, 2048, "../../../../test/");
sprintf(command, "open Fluid.app --args %s%s", path, arg+1);
} else {
Modified: branches/branch-3.0/test1/demo.menu
===================================================================
--- branches/branch-3.0/test1/demo.menu 2011-07-04 15:57:30 UTC (rev 8847)
+++ branches/branch-3.0/test1/demo.menu 2011-07-10 16:56:39 UTC (rev 8848)
@@ -55,7 +55,7 @@
@u:fast && slow widgets:fast_slow
@u:inactive:inactive
-@main:Fluid\n(UI design tool):../fluid/fluid valuators.fl
+@main:Fluid\n(UI design tool):../fluid1/fluid valuators.fl
@main:Cool\nDemos...:@e
@e:Mandelbrot:mandelbrot
_______________________________________________
fltk-commit mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk-commit