summaryrefslogtreecommitdiffstats
path: root/src/ui
diff options
context:
space:
mode:
authorJon A. Cruz <jon@joncruz.org>2010-05-06 07:20:39 +0000
committerJon A. Cruz <jon@joncruz.org>2010-05-06 07:20:39 +0000
commit45b9fddee7eed5c5360a08317c0e8c73af818e3b (patch)
treeb003d03d33ae6392d4a3dffaa4ce87539e69af16 /src/ui
parentSwitched icons to have frames, be square, and arranged more efficiently for s... (diff)
downloadinkscape-45b9fddee7eed5c5360a08317c0e8c73af818e3b.tar.gz
inkscape-45b9fddee7eed5c5360a08317c0e8c73af818e3b.zip
Removed redundant refresh button, ui cleanup, added frames, etc. for bug #171376.
Fixed bugs: - https://launchpad.net/bugs/171376 (bzr r9399)
Diffstat (limited to 'src/ui')
-rw-r--r--src/ui/dialog/icon-preview.cpp32
-rw-r--r--src/ui/dialog/icon-preview.h12
2 files changed, 22 insertions, 22 deletions
diff --git a/src/ui/dialog/icon-preview.cpp b/src/ui/dialog/icon-preview.cpp
index f768df4f3..946eed4ca 100644
--- a/src/ui/dialog/icon-preview.cpp
+++ b/src/ui/dialog/icon-preview.cpp
@@ -87,7 +87,6 @@ IconPreviewPanel::IconPreviewPanel() :
timer(0),
pending(false),
hot(1),
- refreshButton(0),
selectionButton(0),
desktopChangeConn(),
docReplacedConn(),
@@ -147,7 +146,10 @@ IconPreviewPanel::IconPreviewPanel() :
Gtk::VBox* magBox = new Gtk::VBox();
- magBox->pack_start( magnified );
+ Gtk::Frame *magFrame = Gtk::manage(new Gtk::Frame(_("Magnified:")));
+ magFrame->add( magnified );
+
+ magBox->pack_start( *magFrame, Gtk::PACK_EXPAND_WIDGET );
magBox->pack_start( magLabel, Gtk::PACK_SHRINK );
@@ -208,30 +210,21 @@ IconPreviewPanel::IconPreviewPanel() :
iconBox.pack_start(splitter);
splitter.pack1( *magBox, true, true );
- splitter.pack2( *verts, false, false );
-
-
- //## The Refresh button
+ Gtk::Frame *actuals = Gtk::manage(new Gtk::Frame(_("Actual Size:")));
+ actuals->add(*verts);
+ splitter.pack2( *actuals, false, false );
- Gtk::HButtonBox* holder = new Gtk::HButtonBox( Gtk::BUTTONBOX_END );
- _getContents()->pack_end(*holder, false, false);
-
- selectionButton = new Gtk::ToggleButton(_("Selection")); // , GTK_RESPONSE_APPLY
- holder->pack_start( *selectionButton, false, false );
+ selectionButton = new Gtk::CheckButton(_("Selection")); // , GTK_RESPONSE_APPLY
+ magBox->pack_start( *selectionButton, Gtk::PACK_SHRINK );
tips.set_tip((*selectionButton), _("Selection only or whole document"));
selectionButton->signal_clicked().connect( sigc::mem_fun(*this, &IconPreviewPanel::modeToggled) );
gint val = prefs->getBool("/iconpreview/selectionOnly");
selectionButton->set_active( val != 0 );
- refreshButton = new Gtk::Button(Gtk::Stock::REFRESH); // , GTK_RESPONSE_APPLY
- holder->pack_end( *refreshButton, false, false );
- tips.set_tip((*refreshButton), _("Refresh the icons"));
- refreshButton->signal_clicked().connect( sigc::mem_fun(*this, &IconPreviewPanel::refreshPreview) );
-
- _getContents()->pack_start(iconBox, Gtk::PACK_EXPAND_WIDGET);
+ _getContents()->pack_start(iconBox, Gtk::PACK_SHRINK);
show_all_children();
@@ -301,7 +294,6 @@ void IconPreviewPanel::refreshPreview()
// Do not refresh too quickly
queueRefresh();
} else if ( desktop ) {
-
if ( selectionButton && selectionButton->get_active() )
{
Inkscape::Selection * sel = sp_desktop_selection(desktop);
@@ -324,9 +316,7 @@ void IconPreviewPanel::refreshPreview()
renderPreview(target);
}
}
- }
- else
- {
+ } else {
SPObject *target = desktop->currentRoot();
if ( target ) {
renderPreview(target);
diff --git a/src/ui/dialog/icon-preview.h b/src/ui/dialog/icon-preview.h
index d90c2b173..a0f813b94 100644
--- a/src/ui/dialog/icon-preview.h
+++ b/src/ui/dialog/icon-preview.h
@@ -75,7 +75,6 @@ private:
Gtk::Image magnified;
Gtk::Label magLabel;
- Gtk::Button *refreshButton;
Gtk::ToggleButton *selectionButton;
guchar** pixMem;
@@ -102,3 +101,14 @@ private:
#endif // SEEN_ICON_PREVIEW_H
+
+/*
+ Local Variables:
+ mode:c++
+ c-file-style:"stroustrup"
+ c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
+ indent-tabs-mode:nil
+ fill-column:99
+ End:
+*/
+// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=99 :