|
@@ -177,6 +177,10 @@ static NSBitmapImageRep* ns_from_gfx(NonnullRefPtr<Gfx::Bitmap> bitmap_p)
|
|
|
[item setState:_preferences.clip_paths ? NSControlStateValueOn : NSControlStateValueOff];
|
|
|
return _doc ? YES : NO;
|
|
|
}
|
|
|
+ if ([item action] == @selector(toggleClipText:)) {
|
|
|
+ [item setState:_preferences.clip_text ? NSControlStateValueOn : NSControlStateValueOff];
|
|
|
+ return _doc ? YES : NO;
|
|
|
+ }
|
|
|
return NO;
|
|
|
}
|
|
|
|
|
@@ -204,6 +208,14 @@ static NSBitmapImageRep* ns_from_gfx(NonnullRefPtr<Gfx::Bitmap> bitmap_p)
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+- (IBAction)toggleClipText:(id)sender
|
|
|
+{
|
|
|
+ if (_doc) {
|
|
|
+ _preferences.clip_text = !_preferences.clip_text;
|
|
|
+ [self invalidateCachedBitmap];
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
- (void)keyDown:(NSEvent*)event
|
|
|
{
|
|
|
// Calls moveLeft: or moveRight: below.
|