示例#1
0
        void SetTheme(string themeName)
        {
            Log <Controller> .Debug("Setting theme {0}", themeName);

            LastTheme = themeName;

            Orientation = ControlOrientation.Vertical;

            if ((Screen.Default.IsComposited) && (!Do.Preferences.ForceClassicWindow))
            {
                window = InterfaceManager.MaybeGetInterfaceNamed(themeName) ?? new ClassicWindow();
            }
            else
            {
                window = new ClassicWindow();
            }

            window.Initialize(this);
            window.KeyPressEvent += KeyPressWrap;
            if (window is Gtk.Window)
            {
                (window as Gtk.Window).Title = "Do";
            }

            Reset();
        }
示例#2
0
        void UnsetTheme()
        {
            if (window == null)
            {
                return;
            }

            Vanish();
            window.KeyPressEvent -= KeyPressWrap;
            window.Dispose();
            window = null;
        }