diff options
| author | Jon A. Cruz <jon@joncruz.org> | 2008-02-20 09:11:27 +0000 |
|---|---|---|
| committer | joncruz <joncruz@users.sourceforge.net> | 2008-02-20 09:11:27 +0000 |
| commit | ae099de0a892d06655ad7143c1443fec5ca517e2 (patch) | |
| tree | eaf460ba9619d9b843f95f2d0bae3b4d6b875cc9 /src/ui | |
| parent | fix Bug #191909 crash on lpe stitch sub-paths, also fix crash for bend path lpe (diff) | |
| download | inkscape-ae099de0a892d06655ad7143c1443fec5ca517e2.tar.gz inkscape-ae099de0a892d06655ad7143c1443fec5ca517e2.zip | |
Decoupled swatch sizes from icon sizes
(bzr r4790)
Diffstat (limited to 'src/ui')
| -rw-r--r-- | src/ui/previewable.h | 4 | ||||
| -rw-r--r-- | src/ui/previewfillable.h | 6 | ||||
| -rw-r--r-- | src/ui/previewholder.cpp | 6 | ||||
| -rw-r--r-- | src/ui/previewholder.h | 8 | ||||
| -rw-r--r-- | src/ui/widget/panel.cpp | 16 |
5 files changed, 20 insertions, 20 deletions
diff --git a/src/ui/previewable.h b/src/ui/previewable.h index dcf638df5..f0c642082 100644 --- a/src/ui/previewable.h +++ b/src/ui/previewable.h @@ -14,7 +14,7 @@ #include <gtkmm/widget.h> -#include "icon-size.h" +#include "../dialogs/eek-preview.h" namespace Inkscape { namespace UI { @@ -40,7 +40,7 @@ class Previewable public: // TODO need to add some nice parameters virtual ~Previewable() {} - virtual Gtk::Widget* getPreview( PreviewStyle style, ViewType view, Inkscape::IconSize size ) = 0; + virtual Gtk::Widget* getPreview( PreviewStyle style, ViewType view, ::PreviewSize size ) = 0; }; diff --git a/src/ui/previewfillable.h b/src/ui/previewfillable.h index 95662732a..d12771c90 100644 --- a/src/ui/previewfillable.h +++ b/src/ui/previewfillable.h @@ -14,7 +14,7 @@ #include "previewable.h" -#include "../icon-size.h" +#include "../dialogs/eek-preview.h" namespace Inkscape { namespace UI { @@ -27,9 +27,9 @@ public: virtual void addPreview( Previewable* preview ) = 0; virtual void freezeUpdates() = 0; virtual void thawUpdates() = 0; - virtual void setStyle( Inkscape::IconSize size, ViewType type) = 0; + virtual void setStyle( ::PreviewSize size, ViewType type) = 0; virtual void setOrientation( Gtk::AnchorType how ) = 0; - virtual Inkscape::IconSize getPreviewSize() const = 0; + virtual ::PreviewSize getPreviewSize() const = 0; virtual ViewType getPreviewType() const = 0; virtual void setWrap( bool b ) = 0; virtual bool getWrap() const = 0; diff --git a/src/ui/previewholder.cpp b/src/ui/previewholder.cpp index 1717e5053..764890395 100644 --- a/src/ui/previewholder.cpp +++ b/src/ui/previewholder.cpp @@ -35,7 +35,7 @@ PreviewHolder::PreviewHolder() : _prefCols(0), _updatesFrozen(false), _anchor(Gtk::ANCHOR_CENTER), - _baseSize(Inkscape::ICON_SIZE_MENU), + _baseSize(PREVIEW_SIZE_SMALL), _view(VIEW_TYPE_LIST), _wrap(false) { @@ -124,7 +124,7 @@ void PreviewHolder::thawUpdates() rebuildUI(); } -void PreviewHolder::setStyle( Inkscape::IconSize size, ViewType view ) +void PreviewHolder::setStyle( ::PreviewSize size, ViewType view ) { if ( size != _baseSize || view != _view ) { _baseSize = size; @@ -238,7 +238,7 @@ void PreviewHolder::calcGridSize( const Gtk::Widget* thing, int itemCount, int& width = w2; } } else { - width = (_baseSize == Inkscape::ICON_SIZE_MENU || _baseSize == Inkscape::ICON_SIZE_DECORATION) ? COLUMNS_FOR_SMALL : COLUMNS_FOR_LARGE; + width = (_baseSize == PREVIEW_SIZE_SMALL || _baseSize == PREVIEW_SIZE_TINY) ? COLUMNS_FOR_SMALL : COLUMNS_FOR_LARGE; if ( _prefCols > 0 ) { width = _prefCols; } diff --git a/src/ui/previewholder.h b/src/ui/previewholder.h index 046cdf7c7..e3515c987 100644 --- a/src/ui/previewholder.h +++ b/src/ui/previewholder.h @@ -17,7 +17,7 @@ #include <gtkmm/bin.h> #include <gtkmm/table.h> #include "previewfillable.h" -#include "../icon-size.h" +#include "../dialogs/eek-preview.h" namespace Inkscape { namespace UI { @@ -32,11 +32,11 @@ public: virtual void addPreview( Previewable* preview ); virtual void freezeUpdates(); virtual void thawUpdates(); - virtual void setStyle( Inkscape::IconSize size, ViewType view ); + virtual void setStyle( ::PreviewSize size, ViewType view ); virtual void setOrientation( Gtk::AnchorType how ); virtual int getColumnPref() const { return _prefCols; } virtual void setColumnPref( int cols ); - virtual Inkscape::IconSize getPreviewSize() const { return _baseSize; } + virtual ::PreviewSize getPreviewSize() const { return _baseSize; } virtual ViewType getPreviewType() const { return _view; } virtual void setWrap( bool b ); virtual bool getWrap() const { return _wrap; } @@ -56,7 +56,7 @@ private: int _prefCols; bool _updatesFrozen; Gtk::AnchorType _anchor; - Inkscape::IconSize _baseSize; + ::PreviewSize _baseSize; ViewType _view; bool _wrap; }; diff --git a/src/ui/widget/panel.cpp b/src/ui/widget/panel.cpp index 0b6527a5a..f6d975778 100644 --- a/src/ui/widget/panel.cpp +++ b/src/ui/widget/panel.cpp @@ -93,7 +93,7 @@ void Panel::_init() guint panel_size = 0; if (_prefs_path) { - panel_size = prefs_get_int_attribute_limited( _prefs_path, "panel_size", 1, 0, 10 ); + panel_size = prefs_get_int_attribute_limited( _prefs_path, "panel_size", 1, 0, static_cast<long long>(PREVIEW_SIZE_HUGE) ); } guint panel_mode = 0; @@ -295,7 +295,7 @@ void Panel::restorePanelPrefs() { guint panel_size = 0; if (_prefs_path) { - panel_size = prefs_get_int_attribute_limited(_prefs_path, "panel_size", 1, 0, 10); + panel_size = prefs_get_int_attribute_limited(_prefs_path, "panel_size", 1, 0, static_cast<long long>(PREVIEW_SIZE_HUGE)); } guint panel_mode = 0; if (_prefs_path) { @@ -335,27 +335,27 @@ void Panel::_bounceCall(int i, int j) switch (j) { case 0: { - _fillable->setStyle(Inkscape::ICON_SIZE_DECORATION, curr_type); + _fillable->setStyle(::PREVIEW_SIZE_TINY, curr_type); } break; case 1: { - _fillable->setStyle(Inkscape::ICON_SIZE_MENU, curr_type); + _fillable->setStyle(::PREVIEW_SIZE_SMALL, curr_type); } break; case 2: { - _fillable->setStyle(Inkscape::ICON_SIZE_SMALL_TOOLBAR, curr_type); + _fillable->setStyle(::PREVIEW_SIZE_MEDIUM, curr_type); } break; case 3: { - _fillable->setStyle(Inkscape::ICON_SIZE_BUTTON, curr_type); + _fillable->setStyle(::PREVIEW_SIZE_BIG, curr_type); } break; case 4: { - _fillable->setStyle(Inkscape::ICON_SIZE_DIALOG, curr_type); + _fillable->setStyle(::PREVIEW_SIZE_HUGE, curr_type); } break; default: @@ -368,7 +368,7 @@ void Panel::_bounceCall(int i, int j) prefs_set_int_attribute (_prefs_path, "panel_mode", j); } if (_fillable) { - Inkscape::IconSize curr_size = _fillable->getPreviewSize(); + ::PreviewSize curr_size = _fillable->getPreviewSize(); switch (j) { case 0: { |
