// "Coming Soon: Profile, Friends, Events etc") public LastfmSourceContents () : base () { HscrollbarPolicy = PolicyType.Never; VscrollbarPolicy = PolicyType.Automatic; viewport = new Viewport (); viewport.ShadowType = ShadowType.None; main_box = new VBox (); main_box.Spacing = 6; main_box.BorderWidth = 5; main_box.ReallocateRedraws = true; // Clamp the width, preventing horizontal scrolling SizeAllocated += delegate (object o, SizeAllocatedArgs args) { // TODO '- 10' worked for Nereid, but not for Cubano; properly calculate the right width we should request main_box.WidthRequest = args.Allocation.Width - 30; }; viewport.Add (main_box); StyleSet += delegate { viewport.ModifyBg (StateType.Normal, Style.Base (StateType.Normal)); viewport.ModifyFg (StateType.Normal, Style.Text (StateType.Normal)); }; AddWithFrame (viewport); ShowAll (); }
public RadioSourceContents() { HscrollbarPolicy = PolicyType.Never; VscrollbarPolicy = PolicyType.Automatic; viewport = new Viewport (); viewport.ShadowType = ShadowType.None; main_box = new VBox (); main_box.Spacing = 6; main_box.BorderWidth = 5; main_box.ReallocateRedraws = true; // Clamp the width, preventing horizontal scrolling SizeAllocated += delegate(object o, SizeAllocatedArgs args) { main_box.WidthRequest = args.Allocation.Width - 10; }; viewport.Add (main_box); StyleSet += delegate { viewport.ModifyBg (StateType.Normal, Style.Base (StateType.Normal)); viewport.ModifyFg (StateType.Normal, Style.Text (StateType.Normal)); }; logo_pix = new Gdk.Pixbuf (System.Reflection.Assembly.GetExecutingAssembly () .GetManifestResourceStream ("logo_color_large.gif")); logo = new Image (logo_pix); // auto-scale logo SizeAllocated += delegate(object o, SizeAllocatedArgs args) { int width = args.Allocation.Width - 50; logo.Pixbuf = logo_pix.ScaleSimple (width, (int)((float)width / 6.3f), Gdk.InterpType.Bilinear); }; main_box.PackStart (logo, false, false, 0); genres = new TitledList ("Genres"); main_box.PackStart (genres, false, false, 0); AddWithFrame (viewport); ShowAll (); }
public SongKickSourceContents() { //HscrollbarPolicy = PolicyType.Never; //VscrollbarPolicy = PolicyType.Automatic; viewport = new Viewport (); viewport.ShadowType = ShadowType.None; main_box = new HBox () { Spacing = 6, BorderWidth = 5, ReallocateRedraws = true }; search_by_artist_contents_box = new SearchEventsBox (new EventsByArtistSearch()); search_by_location_contents_box = new SearchEventsBox (new EventsByLocationSearch()); search_location_contents_box = new SearchLocationBox (new LocationSearch()); search_artists_contents_box = new SearchArtistsBox (new ArtistSearch()); recommendations_contents_box = new RecommendedArtistsBox(); recommendations_contents_box.RowActivated += OnRecommendedArtistRowActivate; search_location_contents_box.View.RowActivated += SearchLocationRowActivate; search_artists_contents_box.View.RowActivated += SearchArtistRowActivate; menu_box = BuildTiles(); main_box.PackStart (menu_box, false, false, 0); contents_box = new HBox (); main_box.PackStart (contents_box, true, true, 0); // set default contents box SetView (this.presonal_recommendation_view); // Clamp the width, preventing horizontal scrolling /* SizeAllocated += delegate (object o, SizeAllocatedArgs args) { // TODO '- 10' worked for Nereid, but not for Cubano; properly calculate the right width we should request main_box.WidthRequest = args.Allocation.Width - 30; }; */ viewport.Add (main_box); #pragma warning disable 612 StyleSet += delegate { viewport.ModifyBg (StateType.Normal, Style.Base (StateType.Normal)); viewport.ModifyFg (StateType.Normal, Style.Text (StateType.Normal)); }; #pragma warning restore 612 recommendations_contents_box.LoadAndPresentRecommendations (); AddWithFrame (viewport); ShowAll (); }