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
        void SetupMode()
        {
            if (adj == null || textEditor == null)
            {
                return;
            }
            if (vScrollBar != null)
            {
                vScrollBar.Destroy();
                vScrollBar = null;
            }

            if (mapMode != null)
            {
                mapMode.Destroy();
                mapMode = null;
            }
            switch (ScrollBarMode)
            {
            case ScrollBarMode.Normal:
                vScrollBar = new VScrollbar(adj);
                PackStart(vScrollBar, true, true, 0);
                break;

            case ScrollBarMode.Overview:
                mapMode = new QuickTaskOverviewMode(this);
                PackStart(mapMode, true, true, 0);
                break;

            case ScrollBarMode.Minimap:
                mapMode = new QuickTaskMiniMapMode(this);
                PackStart(mapMode, true, true, 0);
                break;

            default:
                throw new ArgumentOutOfRangeException();
            }
            ShowAll();
        }