diff options
| author | Albrecht Schlosser <albrechts.fltk@online.de> | 2015-03-01 20:16:56 +0000 |
|---|---|---|
| committer | Albrecht Schlosser <albrechts.fltk@online.de> | 2015-03-01 20:16:56 +0000 |
| commit | 4d1e372e09c850bddbb5e7e05d7ed21e7de7de3d (patch) | |
| tree | a851887522f90940900f1a6edcabb93b652a689f /src/Fl_get_system_colors.cxx | |
| parent | 966ca9faa3ea0ae97a081e933852cb6839bfd38c (diff) | |
Improve Fl_Tiled_Image drawing, scheme background setup, and documentation.
Fl::scheme("plastic") now correctly sets the background image width and
height to 0, which causes the background image to fill the whole window.
Fl_Tiled_Image drawing was partly broken. Offsets (cx, cy) were not used
correctly, and some other inconsistencies with arguments were possible.
Drawing has been optimized to draw only those tiles that are not clipped.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10598 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src/Fl_get_system_colors.cxx')
| -rw-r--r-- | src/Fl_get_system_colors.cxx | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/Fl_get_system_colors.cxx b/src/Fl_get_system_colors.cxx index 76c613a29..c0385d53f 100644 --- a/src/Fl_get_system_colors.cxx +++ b/src/Fl_get_system_colors.cxx @@ -355,7 +355,7 @@ int Fl::reload_scheme() { tile.uncache(); - if (!scheme_bg_) scheme_bg_ = new Fl_Tiled_Image(&tile, w(), h()); + if (!scheme_bg_) scheme_bg_ = new Fl_Tiled_Image(&tile, 0, 0); // Load plastic buttons, etc... set_boxtype(FL_UP_FRAME, FL_PLASTIC_UP_FRAME); @@ -438,6 +438,14 @@ int Fl::reload_scheme() { } // Set (or clear) the background tile for all windows... + + // FIXME: This makes it impossible to assign a background image + // and/or a label to a window. IMHO we should be able to assign a + // background image to a window. Currently (as of FLTK 1.3.3) there + // is the workaround to use a group inside the window to achieve this. + // See also STR #3075. + // AlbrechtS, 01 Mar 2015 + for (win = first_window(); win; win = next_window(win)) { win->labeltype(scheme_bg_ ? FL_NORMAL_LABEL : FL_NO_LABEL); win->align(FL_ALIGN_CENTER | FL_ALIGN_INSIDE | FL_ALIGN_CLIP); |
