Hi,

here is another little patch adding just two lines to allow resizing the knob  
of a slider. The knob image needs a [image setScalesWhenResized:YES] to allow  
scaling the image.

Best wishes,
Georg


2005-11-13 Georg Fleischmann
        * gui/Source/NSSliderCell.m
          [NSSliderCell -drawInteriorWithFrame:inView:]:
          allow scaling of knob image


*** gui/Source/NSSliderCell.m.old       2005-07-22 17:15:49.000000000 +0200
--- gui/Source/NSSliderCell.m   2005-11-12 16:42:46.000000000 +0100
***************
*** 193,198 ****
--- 193,199 ----
        {
          image = [NSImage imageNamed: @"common_SliderVert"];
          size = [image size];
+           [image setScalesWhenResized:YES];
          [_knobCell setImage: image];
          [image setSize: NSMakeSize (cellFrame.size.width, size.height)];
        }
***************
*** 200,205 ****
--- 201,207 ----
        {
          image = [NSImage imageNamed: @"common_SliderHoriz"];
          size = [image size];
+           [image setScalesWhenResized:YES];
          [_knobCell setImage: image];
          [image setSize: NSMakeSize (size.width, cellFrame.size.height)];
        }


_______________________________________________
Bug-gnustep mailing list
Bug-gnustep@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-gnustep

Reply via email to