Author: greg.ercolano
Date: 2011-02-13 09:30:17 -0800 (Sun, 13 Feb 2011)
New Revision: 8420
Log:
Selection color fixes, widget screenshot added to top of docs.
Added:
branches/branch-1.3/documentation/src/tree-simple.png
Modified:
branches/branch-1.3/FL/Fl_Tree.H
branches/branch-1.3/src/Fl_Tree.cxx
branches/branch-1.3/src/Fl_Tree_Item.cxx
Modified: branches/branch-1.3/FL/Fl_Tree.H
===================================================================
--- branches/branch-1.3/FL/Fl_Tree.H 2011-02-13 16:13:04 UTC (rev 8419)
+++ branches/branch-1.3/FL/Fl_Tree.H 2011-02-13 17:30:17 UTC (rev 8420)
@@ -45,6 +45,9 @@
///
/// \brief Tree widget.
///
+/// \image html tree-simple.png "Fl_Tree example program"
+/// \image latex tree-simple.png "Fl_Tree example program" width=4cm
+///
/// \code
/// Fl_Tree // Top level widget
/// |--- Fl_Tree_Item // Items in the tree
Added: branches/branch-1.3/documentation/src/tree-simple.png
===================================================================
(Binary files differ)
Property changes on: branches/branch-1.3/documentation/src/tree-simple.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Modified: branches/branch-1.3/src/Fl_Tree.cxx
===================================================================
--- branches/branch-1.3/src/Fl_Tree.cxx 2011-02-13 16:13:04 UTC (rev 8419)
+++ branches/branch-1.3/src/Fl_Tree.cxx 2011-02-13 17:30:17 UTC (rev 8420)
@@ -93,7 +93,7 @@
_callback_reason = FL_TREE_REASON_NONE;
_scrollbar_size = 0; // 0: uses
Fl::scrollbar_size()
box(FL_DOWN_BOX);
- color(FL_WHITE);
+ color(FL_BACKGROUND2_COLOR, FL_SELECTION_COLOR);
when(FL_WHEN_CHANGED);
_vscroll = new Fl_Scrollbar(0,0,0,0); // will be resized by
draw()
_vscroll->hide();
Modified: branches/branch-1.3/src/Fl_Tree_Item.cxx
===================================================================
--- branches/branch-1.3/src/Fl_Tree_Item.cxx 2011-02-13 16:13:04 UTC (rev
8419)
+++ branches/branch-1.3/src/Fl_Tree_Item.cxx 2011-02-13 17:30:17 UTC (rev
8420)
@@ -562,12 +562,12 @@
W += prefs.openicon()->w();
}
// Colors, fonts
- Fl_Color fg = _selected ? _labelbgcolor : _labelfgcolor; //
selected uses bgcolor, unselected uses fgcolor
- Fl_Color bg = _selected ? tree->selection_color() : _labelbgcolor; //
selected uses selectcolor, unselected uses bgcolor
- if ( ! _active ) {
- fg = fl_inactive(fg);
- if ( _selected ) bg = fl_inactive(bg);
- }
+ Fl_Color fg = _selected ? fl_contrast(_labelfgcolor, tree->selection_color())
+ : _active ? _labelfgcolor
+ : fl_inactive(_labelfgcolor);
+ Fl_Color bg = _selected ? _active ? tree->selection_color()
+ : fl_inactive(tree->selection_color())
+ : _labelbgcolor;
// Update the xywh of this item
_xywh[0] = X;
_xywh[1] = Y;
_______________________________________________
fltk-commit mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk-commit