Inheritance: Gtk.ScrolledWindow
示例#1
0
        private void BuildViews()
        {
            source_box = new VBox();

            views_pane = new HPaned();
            PersistentPaneController.Control(views_pane, SourceViewWidth);
            view_container = new ViewContainer();

            source_view    = new SourceView();
            composite_view = new CompositeTrackSourceContents();

            Container source_scroll;

            Hyena.Widgets.ScrolledWindow window;
            if (ApplicationContext.CommandLine.Contains("smooth-scroll"))
            {
                window = new Hyena.Widgets.SmoothScrolledWindow();
            }
            else
            {
                window = new Hyena.Widgets.ScrolledWindow();
            }

            window.Add(source_view);
            source_scroll = window;

            composite_view.TrackView.HeaderVisible = false;
            view_container.Content = composite_view;

            source_box.PackStart(source_scroll, true, true, 0);
            source_box.PackStart(new UserJobTileHost(), false, false, 0);

            UpdateCoverArtDisplay();

            source_view.SetSizeRequest(125, -1);
            view_container.SetSizeRequest(425, -1);

            views_pane.Pack1(source_box, false, false);
            views_pane.Pack2(view_container, true, false);

            source_box.ShowAll();
            view_container.Show();
            views_pane.Show();

            primary_vbox.PackStart(views_pane, true, true, 0);
        }
示例#2
0
        private void BuildViews ()
        {
            source_box = new VBox ();

            views_pane = new HPaned ();
            PersistentPaneController.Control (views_pane, SourceViewWidth);
            view_container = new ViewContainer ();

            source_view = new SourceView ();
            composite_view = new CompositeTrackSourceContents ();

            Container source_scroll;
            if (PlatformDetection.IsMeeGo) {
                source_scroll = new Gtk.ScrolledWindow () {
                    HscrollbarPolicy = PolicyType.Never,
                    VscrollbarPolicy = PolicyType.Automatic,
                    ShadowType = ShadowType.None
                };
                source_scroll.Add (source_view);

                var color = new Gdk.Color ((byte)0xe6, (byte)0xe6, (byte)0xe6);
                Gdk.Colormap.System.AllocColor (ref color, true, true);
                source_view.ModifyBase (StateType.Normal, color);
            } else {
                Hyena.Widgets.ScrolledWindow window;
                if (ApplicationContext.CommandLine.Contains ("smooth-scroll")) {
                    window = new Hyena.Widgets.SmoothScrolledWindow ();
                } else {
                    window = new Hyena.Widgets.ScrolledWindow ();
                }

                window.AddWithFrame (source_view);
                source_scroll = window;
            }

            composite_view.TrackView.HeaderVisible = false;
            view_container.Content = composite_view;

            source_box.PackStart (source_scroll, true, true, 0);
            source_box.PackStart (new UserJobTileHost (), false, false, 0);

            UpdateCoverArtDisplay ();

            source_view.SetSizeRequest (125, -1);
            view_container.SetSizeRequest (425, -1);

            views_pane.Pack1 (source_box, false, false);
            views_pane.Pack2 (view_container, true, false);

            source_box.ShowAll ();
            view_container.Show ();
            views_pane.Show ();

            primary_vbox.PackStart (views_pane, true, true, 0);
        }
        /// <summary>
        /// Capsules a Gtk Widget in a scolled window to add scrolling
        /// </summary>
        /// <param name="view">
        /// A <see cref="Widget"/> -- the widget to be capsuled
        /// </param>
        /// <returns>
        /// A <see cref="ScrolledWindow"/> -- the scrolled window containing the capsuled widget
        /// </returns>
        private ScrolledWindow SetupView(Widget view)
        {
            ScrolledWindow window = null;

            if (ApplicationContext.CommandLine.Contains ("smooth-scroll")) {
                window = new SmoothScrolledWindow ();
            } else {
                window = new ScrolledWindow ();
            }

            window.Add (view);
            window.HscrollbarPolicy = PolicyType.Automatic;
            window.VscrollbarPolicy = PolicyType.Automatic;

            return window;
        }
示例#4
0
        private void BuildViews()
        {
            source_box = new VBox();

            views_pane = new HPaned();
            PersistentPaneController.Control(views_pane, SourceViewWidth);
            view_container = new ViewContainer();

            source_view    = new SourceView();
            composite_view = new CompositeTrackSourceContents();

            Container source_scroll;

            if (PlatformDetection.IsMeeGo)
            {
                source_scroll = new Gtk.ScrolledWindow()
                {
                    HscrollbarPolicy = PolicyType.Never,
                    VscrollbarPolicy = PolicyType.Automatic,
                    ShadowType       = ShadowType.None
                };
                source_scroll.Add(source_view);

                var color = new Gdk.Color((byte)0xe6, (byte)0xe6, (byte)0xe6);
                Gdk.Colormap.System.AllocColor(ref color, true, true);
                source_view.ModifyBase(StateType.Normal, color);
            }
            else
            {
                Hyena.Widgets.ScrolledWindow window;
                if (ApplicationContext.CommandLine.Contains("smooth-scroll"))
                {
                    window = new Hyena.Widgets.SmoothScrolledWindow();
                }
                else
                {
                    window = new Hyena.Widgets.ScrolledWindow();
                }

                window.AddWithFrame(source_view);
                source_scroll = window;
            }

            composite_view.TrackView.HeaderVisible = false;
            view_container.Content = composite_view;

            source_box.PackStart(source_scroll, true, true, 0);
            source_box.PackStart(new UserJobTileHost(), false, false, 0);

            UpdateCoverArtDisplay();

            source_view.SetSizeRequest(125, -1);
            view_container.SetSizeRequest(425, -1);

            views_pane.Pack1(source_box, false, false);
            views_pane.Pack2(view_container, true, false);

            source_box.ShowAll();
            view_container.Show();
            views_pane.Show();

            primary_vbox.PackStart(views_pane, true, true, 0);
        }
        private Expander CreateScrollableExpander(Widget view)
        {
            ScrolledWindow window = null;

            if (ApplicationContext.CommandLine.Contains ("smooth-scroll")) {
                window = new SmoothScrolledWindow ();
            } else {
                window = new ScrolledWindow ();
            }

            window.Add (view);
            window.HscrollbarPolicy = PolicyType.Automatic;
            window.VscrollbarPolicy = PolicyType.Automatic;

            Expander expander = new Expander(AddinManager.CurrentLocalizer.GetString ("Track list"));
            expander.Add(window);

            return expander;
        }
示例#6
0
        private void BuildViews()
        {
            source_box = new VBox ();

            views_pane = new HPaned ();
            PersistentPaneController.Control (views_pane, SourceViewWidth);
            view_container = new ViewContainer ();

            source_view = new SourceView ();
            composite_view = new CompositeTrackSourceContents ();

            Container source_scroll;
            Hyena.Widgets.ScrolledWindow window;
            if (ApplicationContext.CommandLine.Contains ("smooth-scroll")) {
                window = new Hyena.Widgets.SmoothScrolledWindow ();
            } else {
                window = new Hyena.Widgets.ScrolledWindow ();
            }

            window.AddWithFrame (source_view);
            source_scroll = window;

            composite_view.TrackView.HeaderVisible = false;
            view_container.Content = composite_view;

            source_box.PackStart (source_scroll, true, true, 0);
            source_box.PackStart (new UserJobTileHost (), false, false, 0);

            UpdateCoverArtDisplay ();

            source_view.SetSizeRequest (125, -1);
            view_container.SetSizeRequest (425, -1);

            views_pane.Pack1 (source_box, false, false);
            views_pane.Pack2 (view_container, true, false);

            source_box.ShowAll ();
            view_container.Show ();
            views_pane.Show ();

            primary_vbox.PackStart (views_pane, true, true, 0);
        }