当前位置: 首页>>代码示例>>C#>>正文


C# Window.EnsureStyle方法代码示例

本文整理汇总了C#中Gtk.Window.EnsureStyle方法的典型用法代码示例。如果您正苦于以下问题:C# Window.EnsureStyle方法的具体用法?C# Window.EnsureStyle怎么用?C# Window.EnsureStyle使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Gtk.Window的用法示例。


在下文中一共展示了Window.EnsureStyle方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: SparkleInfobar

        public SparkleInfobar(string icon_name, string title, string text)
        {
            Window window = new Window (WindowType.Popup) {
                Name = "gtk-tooltip"
            };

            window.EnsureStyle ();

            Style = window.Style;

            Label label = new Label () {
                Markup = "<b>" + title + "</b>\n" + text
            };

            HBox hbox = new HBox (false, 12) {
                BorderWidth = 12
            };

            hbox.PackStart (new Image (SparkleUIHelpers.GetIcon (icon_name, 24)),
                false, false, 0);

            hbox.PackStart (label, false, false, 0);

            Add (hbox);
        }
开发者ID:kristi,项目名称:SparkleShare,代码行数:25,代码来源:SparkleInfobar.cs

示例2: NotificationMessage

		static NotificationMessage ()
		{
			Gtk.Window temp_win = new Gtk.Window (WindowType.Popup);
			temp_win.Name = "gtk-tooltips";
			temp_win.EnsureStyle ();

			style = temp_win.Style.Copy ();
		}
开发者ID:ArsenShnurkov,项目名称:beagle-1,代码行数:8,代码来源:NotificationArea.cs

示例3: MessageBar

        public MessageBar () : base (0.0f, 0.5f, 1.0f, 0.0f)
        {
            win = new Window (WindowType.Popup);
            win.Name = "gtk-tooltips";
            win.EnsureStyle ();
            win.StyleSet += delegate {
                Style = win.Style;
            };

            HBox shell_box = new HBox ();
            shell_box.Spacing = 10;

            box = new HBox ();
            box.Spacing = 10;

            image = new AnimatedImage ();
            try {
                image.Pixbuf = Gtk.IconTheme.Default.LoadIcon ("process-working", 22, IconLookupFlags.NoSvg);
                image.FrameHeight = 22;
                image.FrameWidth = 22;
                Spinning = false;
                image.Load ();
            } catch {
            }

            label = new WrapLabel ();
            label.Show ();

            box.PackStart (image, false, false, 0);
            box.PackStart (label, true, true, 0);
            box.Show ();

            button_box = new HBox ();
            button_box.Spacing = 3;

            close_button = new Button (new Image (Stock.Close, IconSize.Menu));
            close_button.Relief = ReliefStyle.None;
            close_button.Clicked += delegate { Hide (); };
            close_button.ShowAll ();
            close_button.Hide ();

            shell_box.PackStart (box, true, true, 0);
            shell_box.PackStart (button_box, false, false, 0);
            shell_box.PackStart (close_button, false, false, 0);
            shell_box.Show ();

            Add (shell_box);

            EnsureStyle ();

            BorderWidth = 3;
        }
开发者ID:rubenv,项目名称:tripod,代码行数:52,代码来源:MessageBar.cs


注:本文中的Gtk.Window.EnsureStyle方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。