From 63a858d7672ba858b1eda2fd21d27295df84151c Mon Sep 17 00:00:00 2001 From: Lior Halphon Date: Fri, 1 Jul 2022 22:46:03 +0300 Subject: [PATCH] Fix GBS player's appearance on Big Sur and newer --- Cocoa/Document.m | 7 ++- Cocoa/GBS.xib | 54 +++++++++--------- Cocoa/GBS11.xib | 128 ++++++++++++++++++++++++++++++++++++++++++ Cocoa/Next@2x.png | Bin 261 -> 257 bytes Cocoa/Previous@2x.png | Bin 256 -> 266 bytes Cocoa/Rewind@2x.png | Bin 223 -> 215 bytes 6 files changed, 161 insertions(+), 28 deletions(-) mode change 100644 => 100755 Cocoa/GBS.xib create mode 100755 Cocoa/GBS11.xib diff --git a/Cocoa/Document.m b/Cocoa/Document.m index cb9d71e..b29f7b4 100644 --- a/Cocoa/Document.m +++ b/Cocoa/Document.m @@ -933,7 +933,12 @@ static unsigned *multiplication_table_for_frequency(unsigned frequency) for (NSView *view in [_mainWindow.contentView.subviews copy]) { [view removeFromSuperview]; } - [[NSBundle mainBundle] loadNibNamed:@"GBS" owner:self topLevelObjects:nil]; + if (@available(macOS 11, *)) { + [[NSBundle mainBundle] loadNibNamed:@"GBS11" owner:self topLevelObjects:nil]; + } + else { + [[NSBundle mainBundle] loadNibNamed:@"GBS" owner:self topLevelObjects:nil]; + } [_mainWindow setContentSize:self.gbsPlayerView.bounds.size]; _mainWindow.styleMask &= ~NSWindowStyleMaskResizable; dispatch_async(dispatch_get_main_queue(), ^{ // Cocoa is weird, no clue why it's needed diff --git a/Cocoa/GBS.xib b/Cocoa/GBS.xib old mode 100644 new mode 100755 index 534ff55..65bd44f --- a/Cocoa/GBS.xib +++ b/Cocoa/GBS.xib @@ -44,7 +44,7 @@ - - - - - - - - - - - - - - + - - + + @@ -114,6 +91,29 @@ + + + + + + + + + + + + + diff --git a/Cocoa/GBS11.xib b/Cocoa/GBS11.xib new file mode 100755 index 0000000..b7a69fd --- /dev/null +++ b/Cocoa/GBS11.xib @@ -0,0 +1,128 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Cocoa/Next@2x.png b/Cocoa/Next@2x.png index 3bff7f77b05f4bc13554d0419537eee2b13c30b7..c6b9d3aca4070b804aaf83e2c9cac0c6c5070f06 100644 GIT binary patch delta 229 zcmV=0)YaMB!9?BL_t(I%f*y24#F@DMIWrNpiVHe(;ab;-T?I+y+V%wE9wat z%FG>LWvqmdDq#jv35p#fG2mo-$r}=XBd}wRUN#9OVP7d2soWp}HA3A91mQ%coHIyw z>s25Kdlrg7A(lXBDVZpO900000NkvXXu0mjfQEOcA delta 233 zcmVQP5yQP4lJ?9C!-N} zDrP^C79rY~Oo$7GVGt%7FXG6`l=shJi=EWJ287GGa|6rc8)4>m=eDh@M>n z2^gfk|2F8^Cy>B5Zjy*|E~R@&W$chTYBKkfvv`CKEH;r%vfmXfoRn|>gY3=>Mx(?Kq{XxjXvYMkuupxS-g>4jb$s3m*B8Mr750k4NOU}V@_J|W4 oca0000v%CVLwD1pF%-~sSLjn%CIYBV#r{4jjRZ}LTiR|=!!5DGDtEkW%!3p z8M?yH*cD+a{7-d-L|ZMzu#70rfP=@Dh~R+-cos1M4gtc%L^L4`7!Z>vAb=5=%pRdC pJc2Xf@&FU=4}?NOSz#kcApoZcAc03I8@K=f002ovPDHLkV1lHkODq5Y delta 195 zcmV;!06hQK0p9_TB!3BTNLh0L02UYHAOutx*29>G z8U6#|VJwQc8Cn>=0p+0JKNO;a2!@BKGT0RAG3SBJA#ON$6fPsyGYkwi#03u|z%z*na6AYQA|?u9z<`)U0RfB* xkqnPeWgrRn2$qD)15CI-u%uKRSz!Z+0stbp=8B8{$gThY002ovPDHLkV1oNwM=1aR