mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 16:07:45 +00:00
LibPDF+MacPDF: Clip text, and add a debug option for disabling it
This commit is contained in:
parent
90fdf738a1
commit
a0462f495c
7 changed files with 30 additions and 0 deletions
|
@ -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.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue