Ignore:
Timestamp:
Oct 30, 2008, 2:02:29 AM (12 years ago)
Author:
Sam Hocevar
Message:

ThePimp?: add Fullscreen support, including the F11 binding.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • libpipi/trunk/ThePimp/src/MainWindow.cs

    r3039 r3144  
    2020namespace ThePimp
    2121{
     22    [Gtk.Binding(Gdk.Key.F11, "ToggleFullScreen")]
     23
    2224    public partial class MainWindow: Gtk.Window
    2325    {
     
    103105        {
    104106        }
     107
     108        private bool _fullscreen = false;
     109        protected virtual void ToggleFullScreen()
     110        {
     111            _fullscreen = !_fullscreen;
     112
     113            if(_fullscreen)
     114                Fullscreen();
     115            else
     116                Unfullscreen();
     117        }
     118
     119        protected virtual void OnFullscreenActionActivated (object sender, System.EventArgs e)
     120        {
     121            ToggleFullScreen();
     122        }
    105123    }
    106124}
Note: See TracChangeset for help on using the changeset viewer.