From 496eac138c6f62dab4eeebbc56d7a125df3f8b15 Mon Sep 17 00:00:00 2001 From: baptistecdr Date: Wed, 15 May 2019 21:04:24 +0200 Subject: [PATCH 1/2] Added option to enable/disable dock magnification --- rsc/Base.lproj/MainWindow.xib | 61 +++++++++++++++++++++-------------- src/Widgets/DockWidget.m | 6 +++- 2 files changed, 42 insertions(+), 25 deletions(-) diff --git a/rsc/Base.lproj/MainWindow.xib b/rsc/Base.lproj/MainWindow.xib index afd3dff..3505642 100644 --- a/rsc/Base.lproj/MainWindow.xib +++ b/rsc/Base.lproj/MainWindow.xib @@ -1,9 +1,9 @@ - + - - + + @@ -383,7 +383,7 @@ - + @@ -438,7 +438,7 @@ - + @@ -505,11 +505,11 @@ - + - + @@ -518,7 +518,7 @@ - + @@ -541,7 +541,7 @@ - + @@ -553,7 +553,7 @@ In general the folder should contain application aliases. The order of the folde + + + + + - + @@ -766,7 +779,7 @@ In general the folder should contain application aliases. The order of the folde - + @@ -906,9 +919,9 @@ Click to acknowledge. - - - + + + diff --git a/src/Widgets/DockWidget.m b/src/Widgets/DockWidget.m index 5f171f1..2e963d8 100644 --- a/src/Widgets/DockWidget.m +++ b/src/Widgets/DockWidget.m @@ -78,6 +78,7 @@ @interface DockWidgetItemView : NSScrubberItemView @property (assign, getter=isAppRunning, setter=setAppRunning:) BOOL appRunning; @property (assign, getter=isAppLaunching, setter=setAppLaunching:) BOOL appLaunching; @property (assign, getter=isProminent, setter=setProminent:) BOOL prominent; +@property (assign, getter=getDockMagnification, setter=setDockMagnification:) BOOL dockMagnification; @end @implementation DockWidgetItemView @@ -197,7 +198,7 @@ - (void)resizeAppIconView NSRect iconRect = self.bounds; if (iconRect.size.height >= dockDotHeight) { - if (!_prominent) + if (!_prominent || !self.dockMagnification) { iconRect.origin.y += dockDotHeight; iconRect.size.height -= dockDotHeight; @@ -487,11 +488,13 @@ - (NSScrubberItemView *)scrubber:(NSScrubber *)scrubber viewForItemAtIndex:(NSIn } BOOL showsRunningApps = [[NSUserDefaults standardUserDefaults] boolForKey:@"showsRunningApps"]; + BOOL dockMagnification = [[NSUserDefaults standardUserDefaults] boolForKey:@"dockMagnification"]; view.appPath = app.path; view.appIcon = app.icon; view.appRunning = showsRunningApps ? 0 != app.pid : NO; view.appLaunching = showsRunningApps ? app.launching : NO; view.prominent = NO; + view.dockMagnification = dockMagnification; return view; } @@ -832,6 +835,7 @@ - (NSArray *)apps view.appRunning = NO; view.appLaunching = NO; view.prominent = NO; + view.dockMagnification = NO; } [itemViews release]; From 76bb36f2a1d8ce58d58780a8b06660ab61ac1eaf Mon Sep 17 00:00:00 2001 From: baptistecdr Date: Thu, 16 May 2019 06:16:16 +0200 Subject: [PATCH 2/2] Added default behavior for dock magnification --- rsc/defaults.plist | 2 ++ 1 file changed, 2 insertions(+) diff --git a/rsc/defaults.plist b/rsc/defaults.plist index fd785d8..b832cd5 100644 --- a/rsc/defaults.plist +++ b/rsc/defaults.plist @@ -139,6 +139,8 @@ clockShowsWeatherOnTap + dockMagnification + nowPlayingShowsSmallWidget shows24HourClock