diff options
author | Vsevolod Kukol <sevo@xamarin.com> | 2015-11-05 11:23:46 +0300 |
---|---|---|
committer | Vsevolod Kukol <sevoku@xamarin.com> | 2015-11-29 18:28:04 +0300 |
commit | 4267cf51e04f337020e682854fa258034c0ae496 (patch) | |
tree | b6b559def29ec25ae5ff7d24902b0b6f2d680554 /main/src/addins/Deployment/MonoDevelop.Deployment | |
parent | a76037e2990b289ee492ed8d488edf91db56adfd (diff) |
[Deployment] Use ImageView in stetic widgets
Diffstat (limited to 'main/src/addins/Deployment/MonoDevelop.Deployment')
4 files changed, 115 insertions, 72 deletions
diff --git a/main/src/addins/Deployment/MonoDevelop.Deployment/gtk-gui/MonoDevelop.Deployment.FileReplaceDialog.cs b/main/src/addins/Deployment/MonoDevelop.Deployment/gtk-gui/MonoDevelop.Deployment.FileReplaceDialog.cs index 2ef71e78f3..4064b84ff4 100644 --- a/main/src/addins/Deployment/MonoDevelop.Deployment/gtk-gui/MonoDevelop.Deployment.FileReplaceDialog.cs +++ b/main/src/addins/Deployment/MonoDevelop.Deployment/gtk-gui/MonoDevelop.Deployment.FileReplaceDialog.cs @@ -5,44 +5,81 @@ namespace MonoDevelop.Deployment public partial class FileReplaceDialog { private global::Gtk.HBox hbox1; + private global::Gtk.Label label7; - private global::Gtk.Image image1; + + private global::MonoDevelop.Components.ImageView image1; + private global::Gtk.Label label5; + private global::Gtk.Label label6; + private global::Gtk.Label label2; + private global::Gtk.HBox hbox2; + private global::Gtk.Label label8; + private global::Gtk.VBox vbox4; + private global::Gtk.HBox hbox3; + private global::Gtk.RadioButton radioReplace; + private global::Gtk.VBox vbox5; + private global::Gtk.Label replaceLabel; + private global::Gtk.HBox hbox6; + private global::Gtk.Label label25; + private global::Gtk.Label sourceName; + private global::Gtk.HBox hbox7; + private global::Gtk.Label label26; + private global::Gtk.Label sourceModified; + private global::Gtk.HBox hbox4; + private global::Gtk.RadioButton radioKeep; + private global::Gtk.VBox vbox6; + private global::Gtk.Label keepLabel; + private global::Gtk.HBox hbox8; + private global::Gtk.Label label27; + private global::Gtk.Label targetName; + private global::Gtk.HBox hbox9; + private global::Gtk.Label label28; + private global::Gtk.Label targetModified; + private global::Gtk.HBox hbox5; + private global::Gtk.RadioButton radioNewest; + private global::Gtk.VBox vbox7; + private global::Gtk.Label newestLabel; + private global::Gtk.Label label20; + private global::Gtk.CheckButton applyAll; + private global::Gtk.Label label11; + private global::Gtk.Button cancelButton; - private global::Gtk.Button okButton; + private global::Gtk.Button okButton; + protected virtual void Build () { global::Stetic.Gui.Initialize (this); @@ -70,9 +107,10 @@ namespace MonoDevelop.Deployment global::Gtk.Box.BoxChild w2 = ((global::Gtk.Box.BoxChild)(this.hbox1 [this.label7])); w2.Position = 0; // Container child hbox1.Gtk.Box+BoxChild - this.image1 = new global::Gtk.Image (); + this.image1 = new global::MonoDevelop.Components.ImageView (); this.image1.Name = "image1"; - this.image1.Pixbuf = global::Stetic.IconLoader.LoadIcon (this, "gtk-dialog-warning", global::Gtk.IconSize.Dialog); + this.image1.IconId = "gtk-dialog-warning"; + this.image1.IconSize = ((global::Gtk.IconSize)(6)); this.hbox1.Add (this.image1); global::Gtk.Box.BoxChild w3 = ((global::Gtk.Box.BoxChild)(this.hbox1 [this.image1])); w3.Position = 1; @@ -390,26 +428,11 @@ namespace MonoDevelop.Deployment this.cancelButton.CanFocus = true; this.cancelButton.Name = "cancelButton"; this.cancelButton.UseUnderline = true; - // Container child cancelButton.Gtk.Container+ContainerChild - global::Gtk.Alignment w39 = new global::Gtk.Alignment (0.5F, 0.5F, 0F, 0F); - // Container child GtkAlignment.Gtk.Container+ContainerChild - global::Gtk.HBox w40 = new global::Gtk.HBox (); - w40.Spacing = 2; - // Container child GtkHBox.Gtk.Container+ContainerChild - global::Gtk.Image w41 = new global::Gtk.Image (); - w41.Pixbuf = global::Stetic.IconLoader.LoadIcon (this, "gtk-cancel", global::Gtk.IconSize.Button); - w40.Add (w41); - // Container child GtkHBox.Gtk.Container+ContainerChild - global::Gtk.Label w43 = new global::Gtk.Label (); - w43.LabelProp = global::Mono.Unix.Catalog.GetString ("_Cancel deployment"); - w43.UseUnderline = true; - w40.Add (w43); - w39.Add (w40); - this.cancelButton.Add (w39); + this.cancelButton.Label = global::Mono.Unix.Catalog.GetString ("_Cancel deployment"); this.AddActionWidget (this.cancelButton, -6); - global::Gtk.ButtonBox.ButtonBoxChild w47 = ((global::Gtk.ButtonBox.ButtonBoxChild)(w38 [this.cancelButton])); - w47.Expand = false; - w47.Fill = false; + global::Gtk.ButtonBox.ButtonBoxChild w39 = ((global::Gtk.ButtonBox.ButtonBoxChild)(w38 [this.cancelButton])); + w39.Expand = false; + w39.Fill = false; // Container child dialog1_ActionArea.Gtk.ButtonBox+ButtonBoxChild this.okButton = new global::Gtk.Button (); this.okButton.CanDefault = true; @@ -419,10 +442,10 @@ namespace MonoDevelop.Deployment this.okButton.UseUnderline = true; this.okButton.Label = "gtk-ok"; this.AddActionWidget (this.okButton, -5); - global::Gtk.ButtonBox.ButtonBoxChild w48 = ((global::Gtk.ButtonBox.ButtonBoxChild)(w38 [this.okButton])); - w48.Position = 1; - w48.Expand = false; - w48.Fill = false; + global::Gtk.ButtonBox.ButtonBoxChild w40 = ((global::Gtk.ButtonBox.ButtonBoxChild)(w38 [this.okButton])); + w40.Position = 1; + w40.Expand = false; + w40.Fill = false; if ((this.Child != null)) { this.Child.ShowAll (); } diff --git a/main/src/addins/Deployment/MonoDevelop.Deployment/gtk-gui/MonoDevelop.Deployment.Gui.DeployDialog.cs b/main/src/addins/Deployment/MonoDevelop.Deployment/gtk-gui/MonoDevelop.Deployment.Gui.DeployDialog.cs index 504f5d72d3..29affc7b0e 100644 --- a/main/src/addins/Deployment/MonoDevelop.Deployment/gtk-gui/MonoDevelop.Deployment.Gui.DeployDialog.cs +++ b/main/src/addins/Deployment/MonoDevelop.Deployment/gtk-gui/MonoDevelop.Deployment.Gui.DeployDialog.cs @@ -5,57 +5,109 @@ namespace MonoDevelop.Deployment.Gui internal partial class DeployDialog { private global::Gtk.HBox hbox1; + private global::Gtk.VBox vbox2; - private global::Gtk.Image image2; + + private global::MonoDevelop.Components.ImageView image2; + private global::Gtk.Notebook notebook; + private global::Gtk.VBox vbox3; + private global::Gtk.Label labelTitle; + private global::Gtk.HSeparator hseparator2; + private global::Gtk.Label label1; + private global::Gtk.ScrolledWindow scrolledwindow2; + private global::Gtk.TreeView targetsTree; + private global::Gtk.Label label2; + private global::Gtk.VBox pageSelectProject; + private global::Gtk.Label labelTitle1; + private global::Gtk.HSeparator hseparator4; + private global::Gtk.Label label4; + private global::MonoDevelop.Deployment.Gui.EntrySelectionTree entryTree; + private global::Gtk.Label label3; + private global::Gtk.VBox vbox4; + private global::Gtk.Label label5; + private global::Gtk.HSeparator hseparator3; + private global::Gtk.EventBox editorBox; + private global::Gtk.HSeparator saveSeparator; + private global::Gtk.HBox hbox2; + private global::Gtk.CheckButton checkSave; + private global::Gtk.Label label6; + private global::Gtk.VBox pageSave; + private global::Gtk.Label label7; + private global::Gtk.HSeparator hseparator5; + private global::Gtk.VBox vbox7; + private global::Gtk.Label label14; + private global::Gtk.HBox hbox4; + private global::Gtk.Label label13; + private global::Gtk.Entry entrySaveName; + private global::Gtk.VBox vboxSaveProject; + private global::Gtk.HSeparator hseparator6; + private global::Gtk.Label label15; + private global::Gtk.RadioButton radioCreateProject; + private global::Gtk.HBox hbox5; + private global::Gtk.Label label9; + private global::Gtk.Table tableNewProject; + private global::Gtk.ComboBox comboCreateProject; + private global::Gtk.Entry entryProjectName; + private global::Gtk.Label label11; + private global::Gtk.Label label16; + private global::Gtk.RadioButton radioAddProject; + private global::Gtk.HBox boxAddProject; + private global::Gtk.Label label10; + private global::Gtk.Label label12; + private global::Gtk.ComboBox comboSelProject; + private global::Gtk.Label label8; + private global::Gtk.Button buttonCancel; + private global::Gtk.Button buttonBack; + private global::Gtk.Button buttonNext; protected virtual void Build () @@ -80,9 +132,10 @@ namespace MonoDevelop.Deployment.Gui this.vbox2 = new global::Gtk.VBox (); this.vbox2.Name = "vbox2"; // Container child vbox2.Gtk.Box+BoxChild - this.image2 = new global::Gtk.Image (); + this.image2 = new global::MonoDevelop.Components.ImageView (); this.image2.Name = "image2"; - this.image2.Pixbuf = global::Gdk.Pixbuf.LoadFromResource ("package-48.png"); + this.image2.IconId = "md-package"; + this.image2.IconSize = ((global::Gtk.IconSize)(6)); this.vbox2.Add (this.image2); global::Gtk.Box.BoxChild w2 = ((global::Gtk.Box.BoxChild)(this.vbox2 [this.image2])); w2.Position = 0; diff --git a/main/src/addins/Deployment/MonoDevelop.Deployment/gtk-gui/generated.cs b/main/src/addins/Deployment/MonoDevelop.Deployment/gtk-gui/generated.cs index 5cdc11900b..3285e87c05 100644 --- a/main/src/addins/Deployment/MonoDevelop.Deployment/gtk-gui/generated.cs +++ b/main/src/addins/Deployment/MonoDevelop.Deployment/gtk-gui/generated.cs @@ -67,40 +67,6 @@ namespace Stetic } } - internal class IconLoader - { - public static Gdk.Pixbuf LoadIcon (Gtk.Widget widget, string name, Gtk.IconSize size) - { - Gdk.Pixbuf res = widget.RenderIcon (name, size, null); - if ((res != null)) { - return res; - } else { - int sz; - int sy; - global::Gtk.Icon.SizeLookup (size, out sz, out sy); - try { - return Gtk.IconTheme.Default.LoadIcon (name, sz, 0); - } catch (System.Exception) { - if ((name != "gtk-missing-image")) { - return Stetic.IconLoader.LoadIcon (widget, "gtk-missing-image", size); - } else { - Gdk.Pixmap pmap = new Gdk.Pixmap (Gdk.Screen.Default.RootWindow, sz, sz); - Gdk.GC gc = new Gdk.GC (pmap); - gc.RgbFgColor = new Gdk.Color (255, 255, 255); - pmap.DrawRectangle (gc, true, 0, 0, sz, sz); - gc.RgbFgColor = new Gdk.Color (0, 0, 0); - pmap.DrawRectangle (gc, false, 0, 0, (sz - 1), (sz - 1)); - gc.SetLineAttributes (3, Gdk.LineStyle.Solid, Gdk.CapStyle.Round, Gdk.JoinStyle.Round); - gc.RgbFgColor = new Gdk.Color (255, 0, 0); - pmap.DrawLine (gc, (sz / 4), (sz / 4), ((sz - 1) - (sz / 4)), ((sz - 1) - (sz / 4))); - pmap.DrawLine (gc, ((sz - 1) - (sz / 4)), (sz / 4), (sz / 4), ((sz - 1) - (sz / 4))); - return Gdk.Pixbuf.FromDrawable (pmap, pmap.Colormap, 0, 0, 0, 0, sz, sz); - } - } - } - } - } - internal class ActionGroups { public static Gtk.ActionGroup GetActionGroup (System.Type type) diff --git a/main/src/addins/Deployment/MonoDevelop.Deployment/gtk-gui/gui.stetic b/main/src/addins/Deployment/MonoDevelop.Deployment/gtk-gui/gui.stetic index 7d5838219c..76b23ed078 100644 --- a/main/src/addins/Deployment/MonoDevelop.Deployment/gtk-gui/gui.stetic +++ b/main/src/addins/Deployment/MonoDevelop.Deployment/gtk-gui/gui.stetic @@ -1,4 +1,4 @@ -<?xml version="1.0" encoding="utf-8"?> +<?xml version="1.0" encoding="utf-8"?> <stetic-interface> <configuration> <images-root-path>..</images-root-path> @@ -237,9 +237,10 @@ <widget class="Gtk.VBox" id="vbox2"> <property name="MemberName" /> <child> - <widget class="Gtk.Image" id="image2"> + <widget class="MonoDevelop.Components.ImageView" id="image2"> <property name="MemberName" /> - <property name="Pixbuf">resource:package-48.png</property> + <property name="IconId">md-package</property> + <property name="IconSize">Dialog</property> </widget> <packing> <property name="Position">0</property> @@ -1849,9 +1850,10 @@ </packing> </child> <child> - <widget class="Gtk.Image" id="image1"> + <widget class="MonoDevelop.Components.ImageView" id="image1"> <property name="MemberName" /> - <property name="Pixbuf">stock:gtk-dialog-warning Dialog</property> + <property name="IconId">gtk-dialog-warning</property> + <property name="IconSize">Dialog</property> </widget> <packing> <property name="Position">1</property> @@ -2274,8 +2276,7 @@ <widget class="Gtk.Button" id="cancelButton"> <property name="MemberName" /> <property name="CanFocus">True</property> - <property name="Type">TextAndIcon</property> - <property name="Icon">stock:gtk-cancel Button</property> + <property name="Type">TextOnly</property> <property name="Label" translatable="yes">_Cancel deployment</property> <property name="UseUnderline">True</property> <property name="ResponseId">-6</property> @@ -2467,4 +2468,4 @@ </widget> </child> </widget> -</stetic-interface> +</stetic-interface>
\ No newline at end of file |