Commit e5c02705 authored by Felix Paul Kühne's avatar Felix Paul Kühne

macosx: removed the fspanel artwork for scale factor 1.5

This is a broken concept, since according to the HIGL, one point always equals one pixel on non-HiDPI screens regardless of the actual DPIs or the actual screen resolution.

Additionally, this interferes with our support for HiDPI
parent 8ba3d7f4
......@@ -117,85 +117,58 @@ EXTRA_DIST += \
extras/package/macosx/Resources/English.lproj/Wizard.xib \
extras/package/macosx/Resources/fspanel/fs_background.png \
extras/package/macosx/Resources/fspanel/fs_background@2x.png \
extras/package/macosx/Resources/fspanel/fs_background@x1.5.png \
extras/package/macosx/Resources/fspanel/fs_exit_fullscreen.png \
extras/package/macosx/Resources/fspanel/fs_exit_fullscreen@2x.png \
extras/package/macosx/Resources/fspanel/fs_exit_fullscreen@x1.5.png \
extras/package/macosx/Resources/fspanel/fs_exit_fullscreen_highlight.png \
extras/package/macosx/Resources/fspanel/fs_exit_fullscreen_highlight@2x.png \
extras/package/macosx/Resources/fspanel/fs_exit_fullscreen_highlight@x1.5.png \
extras/package/macosx/Resources/fspanel/fs_forward.png \
extras/package/macosx/Resources/fspanel/fs_forward@2x.png \
extras/package/macosx/Resources/fspanel/fs_forward@x1.5.png \
extras/package/macosx/Resources/fspanel/fs_forward_highlight.png \
extras/package/macosx/Resources/fspanel/fs_forward_highlight@2x.png \
extras/package/macosx/Resources/fspanel/fs_forward_highlight@x1.5.png \
extras/package/macosx/Resources/fspanel/fs_pause.png \
extras/package/macosx/Resources/fspanel/fs_pause@2x.png \
extras/package/macosx/Resources/fspanel/fs_pause@x1.5.png \
extras/package/macosx/Resources/fspanel/fs_pause_highlight.png \
extras/package/macosx/Resources/fspanel/fs_pause_highlight@2x.png \
extras/package/macosx/Resources/fspanel/fs_pause_highlight@x1.5.png \
extras/package/macosx/Resources/fspanel/fs_play.png \
extras/package/macosx/Resources/fspanel/fs_play@2x.png \
extras/package/macosx/Resources/fspanel/fs_play@x1.5.png \
extras/package/macosx/Resources/fspanel/fs_play_highlight.png \
extras/package/macosx/Resources/fspanel/fs_play_highlight@2x.png \
extras/package/macosx/Resources/fspanel/fs_play_highlight@x1.5.png \
extras/package/macosx/Resources/fspanel/fs_rewind.png \
extras/package/macosx/Resources/fspanel/fs_rewind@2x.png \
extras/package/macosx/Resources/fspanel/fs_rewind@x1.5.png \
extras/package/macosx/Resources/fspanel/fs_rewind_highlight.png \
extras/package/macosx/Resources/fspanel/fs_rewind_highlight@2x.png \
extras/package/macosx/Resources/fspanel/fs_rewind_highlight@x1.5.png \
extras/package/macosx/Resources/fspanel/fs_skip_next.png \
extras/package/macosx/Resources/fspanel/fs_skip_next@2x.png \
extras/package/macosx/Resources/fspanel/fs_skip_next@x1.5.png \
extras/package/macosx/Resources/fspanel/fs_skip_next_highlight.png \
extras/package/macosx/Resources/fspanel/fs_skip_next_highlight@2x.png \
extras/package/macosx/Resources/fspanel/fs_skip_next_highlight@x1.5.png \
extras/package/macosx/Resources/fspanel/fs_skip_previous.png \
extras/package/macosx/Resources/fspanel/fs_skip_previous@2x.png \
extras/package/macosx/Resources/fspanel/fs_skip_previous@x1.5.png \
extras/package/macosx/Resources/fspanel/fs_skip_previous_highlight.png \
extras/package/macosx/Resources/fspanel/fs_skip_previous_highlight@2x.png \
extras/package/macosx/Resources/fspanel/fs_skip_previous_highlight@x1.5.png \
extras/package/macosx/Resources/fspanel/fs_stop.png \
extras/package/macosx/Resources/fspanel/fs_stop@2x.png \
extras/package/macosx/Resources/fspanel/fs_stop@x1.5.png \
extras/package/macosx/Resources/fspanel/fs_stop_highlight.png \
extras/package/macosx/Resources/fspanel/fs_stop_highlight@2x.png \
extras/package/macosx/Resources/fspanel/fs_stop_highlight@x1.5.png \
extras/package/macosx/Resources/fspanel/fs_time_slider.png \
extras/package/macosx/Resources/fspanel/fs_time_slider@2x.png \
extras/package/macosx/Resources/fspanel/fs_time_slider@x1.5.png \
extras/package/macosx/Resources/fspanel/fs_time_slider_knob.png \
extras/package/macosx/Resources/fspanel/fs_time_slider_knob@2x.png \
extras/package/macosx/Resources/fspanel/fs_time_slider_knob@x1.5.png \
extras/package/macosx/Resources/fspanel/fs_time_slider_knob_highlight.png \
extras/package/macosx/Resources/fspanel/fs_time_slider_knob_highlight@2x.png \
extras/package/macosx/Resources/fspanel/fs_time_slider_knob_highlight@x1.5.png \
extras/package/macosx/Resources/fspanel/fs_volume_max.png \
extras/package/macosx/Resources/fspanel/fs_volume_max@2x.png \
extras/package/macosx/Resources/fspanel/fs_volume_max@x1.5.png \
extras/package/macosx/Resources/fspanel/fs_volume_max_highlight.png \
extras/package/macosx/Resources/fspanel/fs_volume_max_highlight@2x.png \
extras/package/macosx/Resources/fspanel/fs_volume_max_highlight@x1.5.png \
extras/package/macosx/Resources/fspanel/fs_volume_mute.png \
extras/package/macosx/Resources/fspanel/fs_volume_mute@2x.png \
extras/package/macosx/Resources/fspanel/fs_volume_mute@x1.5.png \
extras/package/macosx/Resources/fspanel/fs_volume_mute_highlight.png \
extras/package/macosx/Resources/fspanel/fs_volume_mute_highlight@2x.png \
extras/package/macosx/Resources/fspanel/fs_volume_mute_highlight@x1.5.png \
extras/package/macosx/Resources/fspanel/fs_volume_slider_bar.png \
extras/package/macosx/Resources/fspanel/fs_volume_slider_bar@2x.png \
extras/package/macosx/Resources/fspanel/fs_volume_slider_bar@x1.5.png \
extras/package/macosx/Resources/fspanel/fs_volume_slider_knob.png \
extras/package/macosx/Resources/fspanel/fs_volume_slider_knob@2x.png \
extras/package/macosx/Resources/fspanel/fs_volume_slider_knob@x1.5.png \
extras/package/macosx/Resources/fspanel/fs_volume_slider_knob_highlight.png \
extras/package/macosx/Resources/fspanel/fs_volume_slider_knob_highlight@2x.png \
extras/package/macosx/Resources/fspanel/fs_volume_slider_knob_highlight@x1.5.png \
extras/package/macosx/Resources/icons/aiff.icns \
extras/package/macosx/Resources/icons/audio.icns \
extras/package/macosx/Resources/icons/avi.icns \
......
......@@ -35,8 +35,6 @@
BOOL b_displayed;
BOOL b_voutWasUpdated;
int i_device;
BOOL b_usingBigScreen;
}
- (id)initWithContentRect: (NSRect)contentRect
styleMask: (NSUInteger)aStyle
......@@ -82,8 +80,6 @@
NSButton *o_prev, *o_next, *o_bwd, *o_fwd, *o_play, *o_fullscreen;
NSTextField *o_streamTitle_txt, *o_streamPosition_txt;
NSSlider *o_fs_timeSlider, *o_fs_volumeSlider;
BOOL b_usingBigScreen;
}
- (id)initWithFrame: (NSRect)frameRect;
- (void)drawRect: (NSRect)rect;
......@@ -101,7 +97,6 @@
- (IBAction)backward:(id)sender;
- (IBAction)fsTimeSliderUpdate: (id)sender;
- (IBAction)fsVolumeSliderUpdate: (id)sender;
- (void)adaptViewSizeToScreen: (BOOL)b_value;
@end
......
......@@ -133,12 +133,6 @@
theScreensFrame = [screen frame];
theWindowsFrame = [self frame];
if( theScreensFrame.size.width >= 2560 ) // 27" iMacs, external displays
b_usingBigScreen = YES;
if( (b_usingBigScreen && theWindowsFrame.size.width < 820) || (!b_usingBigScreen && theWindowsFrame.size.width > 550) )
[self adaptWindowSizeToScreen];
theCoordinate.x = (theScreensFrame.size.width - theWindowsFrame.size.width) / 2 + theScreensFrame.origin.x;
theCoordinate.y = (theScreensFrame.size.height / 3) - theWindowsFrame.size.height + theScreensFrame.origin.y;
[self setFrameTopLeftPoint: theCoordinate];
......@@ -387,25 +381,6 @@
[self center];
}
}
- (void)adaptWindowSizeToScreen
{
NSRect theWindowsFrame = [self frame];
if( b_usingBigScreen )
{
theWindowsFrame.size.width = 824;
theWindowsFrame.size.height = 131;
}
else
{
theWindowsFrame.size.width = 549;
theWindowsFrame.size.height = 87;
}
[[self contentView] adaptViewSizeToScreen: b_usingBigScreen];
[self setFrame:theWindowsFrame display:YES animate:YES];
}
@end
/*****************************************************************************
......@@ -440,19 +415,6 @@
[o_text setFont:[NSFont font:[NSFont smallSystemFontSize]]]; \
[self addSubview:o_text];
#define restyleButton( o_button, imageOff, imageOn, _x, _y ) \
[o_button setFrameOrigin: NSMakePoint( _x, _y )]; \
[o_button setImage: [NSImage imageNamed: imageOff]]; \
[o_button setAlternateImage: [NSImage imageNamed: imageOn]]; \
[o_button sizeToFit]; \
[o_button setNeedsDisplay: YES]
#define restyleTextfieldOrSlider( o_field, _x, _y, _w, _h ) \
[o_field setFrameOrigin: NSMakePoint( _x, _y )]; \
[o_field setFrameSize: NSMakeSize( _w, _h )]; \
[o_field setNeedsDisplay: YES]
- (id)initWithFrame:(NSRect)frameRect
{
id view = [super initWithFrame:frameRect];
......@@ -530,30 +492,14 @@
- (void)setPlay
{
if( b_usingBigScreen )
{
[o_play setImage:[NSImage imageNamed:@"fs_play@x1.5"]];
[o_play setAlternateImage: [NSImage imageNamed:@"fs_play_highlight@x1.5"]];
}
else
{
[o_play setImage:[NSImage imageNamed:@"fs_play"]];
[o_play setAlternateImage: [NSImage imageNamed:@"fs_play_highlight"]];
}
}
- (void)setPause
{
if( b_usingBigScreen )
{
[o_play setImage: [NSImage imageNamed:@"fs_pause@x1.5"]];
[o_play setAlternateImage: [NSImage imageNamed:@"fs_pause_highlight@x1.5"]];
}
else
{
[o_play setImage: [NSImage imageNamed:@"fs_pause"]];
[o_play setAlternateImage: [NSImage imageNamed:@"fs_pause_highlight"]];
}
}
- (void)setStreamTitle:(NSString *)o_title
......@@ -645,58 +591,11 @@
NSRect frame = [self frame];
NSRect image_rect;
NSImage *img;
if (b_usingBigScreen)
{
addImage( @"fs_background@x1.5", 0, 0, NSCompositeCopy, 0 );
addImage( @"fs_volume_slider_bar@x1.5", 39, 35.5, NSCompositeSourceOver, 0 );
addImage( @"fs_volume_mute@x1.5", 24, 27, NSCompositeSourceOver, 0 );
addImage( @"fs_volume_max@x1.5", 186, 27, NSCompositeSourceOver, 0 );
addImage( @"fs_time_slider@x1.5", 22.5, 79.5, NSCompositeSourceOver, 0);
}
else
{
addImage( @"fs_background", 0, 0, NSCompositeCopy, 0 );
addImage( @"fs_volume_slider_bar", 26, 23, NSCompositeSourceOver, 0 );
addImage( @"fs_volume_mute", 16, 18, NSCompositeSourceOver, 0 );
addImage( @"fs_volume_max", 124, 18, NSCompositeSourceOver, 0 );
addImage( @"fs_time_slider", 15, 53, NSCompositeSourceOver, 0);
}
}
- (void)adaptViewSizeToScreen:(BOOL)b_value
{
b_usingBigScreen = b_value;
if (b_usingBigScreen)
{
restyleButton( o_prev, @"fs_skip_previous@x1.5", @"fs_skip_previous_highlight@x1.5", 261, 22.5 );
restyleButton( o_bwd, @"fs_rewind@x1.5", @"fs_rewind_highlight@x1.5", 316.5, 21 );
restyleButton( o_play, @"fs_play@x1.5", @"fs_play_highlight@x1.5", 400.5, 15 );
restyleButton( o_fwd, @"fs_forward@x1.5", @"fs_forward_highlight@x1.5", 469.5, 21 );
restyleButton( o_next, @"fs_skip_next@x1.5", @"fs_skip_next_highlight@x1.5", 547.5, 22.5 );
restyleButton( o_fullscreen, @"fs_exit_fullscreen@x1.5", @"fs_exit_fullscreen_hightlight@x1.5", 765.5, 19.5 );
restyleTextfieldOrSlider( o_streamTitle_txt, 148, 96, 528, 21 );
[o_streamTitle_txt setFont:[NSFont systemFontOfSize:[NSFont systemFontSize]]];
restyleTextfieldOrSlider( o_streamPosition_txt, 718, 96, 82.5, 21 );
[o_streamPosition_txt setFont:[NSFont systemFontOfSize:[NSFont systemFontSize]]];
restyleTextfieldOrSlider( o_fs_timeSlider, 22.5, 82.5, 777, 13.5 );
restyleTextfieldOrSlider( o_fs_volumeSlider, 39, 32, 142.5, 15);
}
else
{
restyleButton( o_prev, @"fs_skip_previous", @"fs_skip_previous_highlight", 174, 15 );
restyleButton( o_bwd, @"fs_rewind", @"fs_rewind_highlight", 211, 14 );
restyleButton( o_play, @"fs_play", @"fs_play_highlight", 267, 10 );
restyleButton( o_fwd, @"fs_forward", @"fs_forward_highlight", 313, 14 );
restyleButton( o_next, @"fs_skip_next", @"fs_skip_next_highlight", 365, 15 );
restyleButton( o_fullscreen, @"fs_exit_fullscreen", @"fs_exit_fullscreen_hightlight", 507, 13 );
restyleTextfieldOrSlider( o_streamTitle_txt, 98, 64, 352, 14 );
[o_streamTitle_txt setFont:[NSFont systemFontOfSize:[NSFont smallSystemFontSize]]];
restyleTextfieldOrSlider( o_streamPosition_txt, 471, 64, 65, 14);
[o_streamPosition_txt setFont:[NSFont systemFontOfSize:[NSFont smallSystemFontSize]]];
restyleTextfieldOrSlider( o_fs_timeSlider, 15, 55, 518, 9 );
restyleTextfieldOrSlider( o_fs_volumeSlider, 26, 20, 95, 10);
}
}
@end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment