summaryrefslogtreecommitdiff
path: root/src/Fl_x.cxx
diff options
context:
space:
mode:
authorManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>2022-09-12 11:07:03 +0200
committerManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>2022-09-12 11:07:03 +0200
commit87ee126e1fabd5ae5b1bc6738ff46e0c2b149804 (patch)
treec84e98d46eef4bb14624bac7a59e639878bbcff3 /src/Fl_x.cxx
parentd028f0b37d12636f1956ad59843d2dec96b12a91 (diff)
Allow use of Fl_Window::default_icon() with a scaled image.
Diffstat (limited to 'src/Fl_x.cxx')
-rw-r--r--src/Fl_x.cxx12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/Fl_x.cxx b/src/Fl_x.cxx
index 1a30e80b7..e5c970b0a 100644
--- a/src/Fl_x.cxx
+++ b/src/Fl_x.cxx
@@ -2696,7 +2696,7 @@ static void icons_to_property(const Fl_RGB_Image *icons[], int count,
sz = 0;
for (int i = 0;i < count;i++)
- sz += 2 + icons[i]->w() * icons[i]->h();
+ sz += 2 + icons[i]->data_w() * icons[i]->data_h();
// FIXME: Might want to sort the icons
@@ -2708,15 +2708,15 @@ static void icons_to_property(const Fl_RGB_Image *icons[], int count,
image = icons[i];
- data[0] = image->w();
- data[1] = image->h();
+ data[0] = image->data_w();
+ data[1] = image->data_h();
data += 2;
- const int extra_data = image->ld() ? (image->ld()-image->w()*image->d()) : 0;
+ const int extra_data = image->ld() ? (image->ld() - image->data_w() * image->d()) : 0;
const uchar *in = (const uchar*)*image->data();
- for (int y = 0; y < image->h(); y++) {
- for (int x = 0; x < image->w(); x++) {
+ for (int y = 0; y < image->data_h(); y++) {
+ for (int x = 0; x < image->data_w(); x++) {
switch (image->d()) {
case 1:
*data = ( 0xff<<24) | (in[0]<<16) | (in[0]<<8) | in[0];