# HG changeset patch # User Rik # Date 1587062886 25200 # Node ID fbced93c97049db16fd726f92a2c17d884c4fd90 # Parent ad9252d7472b4bf7aa9bf7601b60557e8c3e5a8b Fix reversal of width and height in uicontrol icon creation (bug #58144). * PushButtonControl.cc (PushButtonControl::PushButtonControl): Reverse order of parameters in call to Utils::makeImageFromCData which expects order to be width, height. * ToggleButtonControl.cc (ToggleButtonControl::ToggleButtonControl): Reverse order of parameters in call to Utils::makeImageFromCData which expects order to be width, height. diff -r ad9252d7472b -r fbced93c9704 libgui/graphics/PushButtonControl.cc --- a/libgui/graphics/PushButtonControl.cc Wed Apr 15 17:23:51 2020 -0400 +++ b/libgui/graphics/PushButtonControl.cc Thu Apr 16 11:48:06 2020 -0700 @@ -69,7 +69,7 @@ btn->setAutoFillBackground (true); octave_value cdat = up.get_cdata (); QImage img = Utils::makeImageFromCData (cdat, - cdat.rows (), cdat.columns ()); + cdat.columns (), cdat.rows ()); btn->setIcon (QIcon (QPixmap::fromImage (img))); } diff -r ad9252d7472b -r fbced93c9704 libgui/graphics/ToggleButtonControl.cc --- a/libgui/graphics/ToggleButtonControl.cc Wed Apr 15 17:23:51 2020 -0400 +++ b/libgui/graphics/ToggleButtonControl.cc Thu Apr 16 11:48:06 2020 -0700 @@ -75,7 +75,7 @@ btn->setAutoFillBackground (true); octave_value cdat = up.get_cdata (); QImage img = Utils::makeImageFromCData (cdat, - cdat.rows (), cdat.columns ()); + cdat.columns (), cdat.rows ()); btn->setIcon (QIcon (QPixmap::fromImage (img))); }