public TrackInfoPopup() : base(Gtk.WindowType.Popup) { BorderWidth = 8; AppPaintable = true; Resizable = false; TypeHint = Gdk.WindowTypeHint.Notification; VBox box = new VBox (); box.Spacing = 4; header = new ClassicTrackInfoDisplay (); header.SetSizeRequest (320, 64); seek_slider = new ConnectedSeekSlider (SeekSliderLayout.Horizontal); seek_slider.StreamPositionLabel.FormatString = "<small>{0}</small>"; seek_slider.LeftPadding = 0; seek_slider.RightPadding = 0; box.PackStart (header, true, true, 0); box.PackStart (seek_slider, false, false, 0); Add (box); box.ShowAll (); }
public static Widget GetEditable(TrackInfoDisplay display) { return(CoverArtEditor.For(display, (x, y) => display.IsWithinCoverart(x, y), () => display.CurrentTrack, () => {} )); }
public static Widget GetEditable(TrackInfoDisplay display) { return CoverArtEditor.For (display, (x, y) => display.IsWithinCoverart (x, y), () => display.CurrentTrack, () => {} ); }
public NowPlayingContents () : base (1, 1, false) { NoShowAll = true; CreateVideoDisplay (); video_event = new EventBox (); video_event.VisibleWindow = false; video_event.CanFocus = true; video_event.AboveChild = true; video_event.Add (video_display); video_event.Events |= Gdk.EventMask.PointerMotionMask | Gdk.EventMask.ButtonPressMask | Gdk.EventMask.ButtonMotionMask | Gdk.EventMask.KeyPressMask | Gdk.EventMask.KeyReleaseMask; //TODO stop tracking mouse when no more in menu video_event.ButtonPressEvent += OnButtonPress; video_event.ButtonReleaseEvent += OnButtonRelease; video_event.MotionNotifyEvent += OnMouseMove; video_event.KeyPressEvent += OnKeyPress; IVideoDisplay ivideo_display = video_display as IVideoDisplay; if (ivideo_display != null) { ivideo_display.IdleStateChanged += OnVideoDisplayIdleStateChanged; } Attach (video_event, 0, 1, 0, 1, AttachOptions.Expand | AttachOptions.Fill, AttachOptions.Expand | AttachOptions.Fill, 0, 0); track_info_display = new NowPlayingTrackInfoDisplay (); Attach (track_info_display, 0, 1, 0, 1, AttachOptions.Expand | AttachOptions.Fill, AttachOptions.Expand | AttachOptions.Fill, 0, 0); video_event.ShowAll (); }
private void Build() { var vbox = new VBox () { Spacing = 12 }; var top = new HBox () { Spacing = 6 }; var bot = new HBox () { Spacing = 6 }; vbox.PackStart (top, false, false, 0); vbox.PackStart (bot, false, false, 0); // Top row: playback buttons, seek slider, full-mode button, volume Widget previous_button = ActionService.PlaybackActions["PreviousAction"].CreateToolItem (); Widget playpause_button = ActionService.PlaybackActions["PlayPauseAction"].CreateToolItem (); Widget button = ActionService.PlaybackActions["NextAction"].CreateToolItem (); Menu menu = ActionService.PlaybackActions.ShuffleActions.CreateMenu (); MenuButton next_button = new MenuButton (button, menu, true); top.PackStart (previous_button, false, false, 0); top.PackStart (playpause_button, false, false, 0); top.PackStart (next_button, false, false, 0); seek_slider = new ConnectedSeekSlider (); top.PackStart (seek_slider, true, true, 0); var fullmode_button = new Button () { Label = Catalog.GetString ("Full Mode"), Image = new Image (Stock.LeaveFullscreen, Gtk.IconSize.Button), Relief = Gtk.ReliefStyle.None }; fullmode_button.Clicked += OnFullmode; top.PackStart (fullmode_button, false, false, 0); volume_button = new ConnectedVolumeButton (); top.PackStart (volume_button, false, false, 0); // Bottom row: source dropdown, track info display (cover art, etc), repeat mode button source_combo_box = new SourceComboBox (); bot.PackStart (source_combo_box, false, false, 0); track_info_display = new ClassicTrackInfoDisplay (); track_info_display.WidthRequest = 250; bot.PackStart (track_info_display, true, true, 0); var repeat_align = new Alignment (1, 1, 1, 1); var repeat_toggle_button = new RepeatActionButton (true); repeat_align.Add (repeat_toggle_button); bot.PackEnd (repeat_align, false, false, 0); fullmode_button.TooltipText = Catalog.GetString ("Switch back to full mode"); repeat_toggle_button.TooltipText = Catalog.GetString ("Change repeat playback mode"); Add (vbox); }