Exemple #1
0
    public void on_button_zoom_out_activate(object o, EventArgs ea)
    {
        if (top_level_notebook.CurrentPage == 0)
        {
            // icon view
            float new_zoom = icon_list.Zoom - 0.1f;
            if (new_zoom < 0.1f)
            {
                new_zoom = 0.1f;
            }
            label_zoom_value.Text = (int)(new_zoom * 100.0f) + "%";
            icon_list.Zoom        = new_zoom;
        }
        else if (top_level_notebook.CurrentPage == 1)
        {
#if HAVE_LIBEOG
            EogImageView view = image_ui.ImageView;
            if (view.Pixbuf.Handle == IntPtr.Zero)
            {
                return;
            }

            view.Zoom            -= 0.1;
            label_zoom_value.Text = (int)(view.Zoom * 100.0f) + "%";
#endif
        }
    }
Exemple #2
0
    public void on_button_zoom_in_activate(object o, EventArgs ea)
    {
        if (top_level_notebook.CurrentPage == 0)
        {
            // icon view
            float new_zoom = icon_list.Zoom + 0.1f;
            if (new_zoom > 2.0f)
            {
                new_zoom = 2.0f;
            }
            // this should be handled by the icon_view
            label_zoom_value.Text = (int)(new_zoom * 100.0f) + "%";
            icon_list.Zoom        = new_zoom;
        }
        else if (top_level_notebook.CurrentPage == 1)
        {
            // preview
#if HAVE_LIBEOG
            EogImageView view = image_ui.ImageView;
            if (view.Pixbuf.Handle == IntPtr.Zero)
            {
                return;
            }

            view.Zoom            += 0.1;
            label_zoom_value.Text = (int)(view.Zoom * 100.0f) + "%";
#endif
        }
    }
Exemple #3
0
    void OnPageChange(object sender, uint page)
    {
        if (page == 0)
        {
            label_zoom_value.Text = (int)(icon_list.Zoom * 100.0f) + "%";
        }
        else if (page == 1)
        {
#if HAVE_LIBEOG
            EogImageView view = image_ui.ImageView;
            label_zoom_value.Text = (int)(view.Zoom * 100.0f) + "%";
#endif
        }
        else
        {
            Console.WriteLine("Got page: {0}!?", page);
        }
    }