protected override void OnStyleSet(Style previous_style)
 {
     base.OnStyleSet(previous_style);
     if (Core.Platform.IsWindows)
     {
         using (var scrollstyle = Rc.GetStyleByPaths(Settings, null, null, VScrollbar.GType)) {
             var scrl = new VScrollbar(null);
             scrl.Style          = scrollstyle;
             win81Slider         = scrollstyle.Background(StateType.Normal).ToCairoColor();
             win81SliderPrelight = scrollstyle.Background(StateType.Prelight).ToCairoColor();
             win81ScrollbarWidth = (int)scrl.StyleGetProperty("slider-width");
             scrl.Destroy();
         }
     }
 }
예제 #2
0
        public WarningTooltip(Widget baseWidget) : base(WindowType.Popup)
        {
            mBaseWidget = baseWidget;

            mLabel           = new Label();
            mLabel.UseMarkup = true;
            Add(mLabel);
            BorderWidth = 4;
            mLabel.Show();

            SizeAllocated += HandleSizeAllocated;

            using (Style stl = Rc.GetStyleByPaths(this.Settings, "gtk-tooltip*", "gtk-tooltip*", GLib.GType.None))
            {
                this.Style   = stl;
                mLabel.Style = stl;
            }
        }