bug-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Fix, NSSliderCell - knob resizing


From: Georg Fleischmann
Subject: Fix, NSSliderCell - knob resizing
Date: Sun, 13 Nov 2005 16:10:46 GMT

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)];
        }




reply via email to

[Prev in Thread] Current Thread [Next in Thread]