[solang] Tweaked the ThumbnailView
- From: Debarshi Ray <debarshir src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [solang] Tweaked the ThumbnailView
- Date: Mon, 18 Jan 2010 21:46:21 +0000 (UTC)
commit 36c1ba28e045e15a39f38a02a16e05a129ca7ad0
Author: Debarshi Ray <rishi gnu org>
Date: Sat Jan 16 01:10:18 2010 +0200
Tweaked the ThumbnailView
+ No need to have a Gtk::CellRendererText as we are not using it
+ Reduced the row and column spacing to 6
src/renderer/browser-renderer.cpp | 4 ++--
src/renderer/cell-renderer-thumbnail.cpp | 1 -
src/renderer/thumbnail-view.cpp | 21 ++++-----------------
src/renderer/thumbnail-view.h | 2 --
4 files changed, 6 insertions(+), 22 deletions(-)
---
diff --git a/src/renderer/browser-renderer.cpp b/src/renderer/browser-renderer.cpp
index 905a443..cf3ab73 100644
--- a/src/renderer/browser-renderer.cpp
+++ b/src/renderer/browser-renderer.cpp
@@ -689,8 +689,8 @@ BrowserRenderer::set_thumbnail_size() throw()
ratioHeight
* static_cast<double>(zoomValue_));
- thumbnailView_.set_thumbnail_width(thumbnail_width + 12);
- thumbnailView_.set_thumbnail_height(thumbnail_height + 12);
+ thumbnailView_.set_thumbnail_width(thumbnail_width + 6);
+ thumbnailView_.set_thumbnail_height(thumbnail_height + 6);
}
} // namespace Solang
diff --git a/src/renderer/cell-renderer-thumbnail.cpp b/src/renderer/cell-renderer-thumbnail.cpp
index 641ff29..548452e 100644
--- a/src/renderer/cell-renderer-thumbnail.cpp
+++ b/src/renderer/cell-renderer-thumbnail.cpp
@@ -32,7 +32,6 @@
namespace Solang
{
-
CellRendererThumbnail::CellRendererThumbnail() throw() :
Gtk::CellRendererPixbuf(),
extraHeight_(0),
diff --git a/src/renderer/thumbnail-view.cpp b/src/renderer/thumbnail-view.cpp
index 4e80b38..13529f9 100644
--- a/src/renderer/thumbnail-view.cpp
+++ b/src/renderer/thumbnail-view.cpp
@@ -76,8 +76,7 @@ ThumbnailView::ThumbnailView(gint thumbnail_renderer_width,
uiManager_(Gtk::UIManager::create()),
uiID_(uiManager_->add_ui_from_file(uiFile)),
menu_(NULL),
- rendererThumbnail_(),
- rendererText_()
+ rendererThumbnail_()
{
configure(thumbnail_renderer_width, thumbnail_renderer_height);
}
@@ -94,8 +93,7 @@ ThumbnailView::ThumbnailView(const TreeModelPtr & model,
uiManager_(Gtk::UIManager::create()),
uiID_(uiManager_->add_ui_from_file(uiFile)),
menu_(NULL),
- rendererThumbnail_(),
- rendererText_()
+ rendererThumbnail_()
{
configure(thumbnail_renderer_width, thumbnail_renderer_height);
}
@@ -113,8 +111,8 @@ ThumbnailView::configure(gint thumbnail_renderer_width,
set_orientation(Gtk::ORIENTATION_VERTICAL);
set_selection_mode(Gtk::SELECTION_MULTIPLE);
set_spacing(0);
- set_column_spacing(8);
- set_row_spacing(8);
+ set_column_spacing(6);
+ set_row_spacing(6);
set_has_tooltip(true);
actionGroup_->add(Gtk::Action::create("ActionOpenWithMenu",
@@ -129,8 +127,6 @@ ThumbnailView::configure(gint thumbnail_renderer_width,
= GTK_CELL_LAYOUT(Gtk::IconView::gobj());
GtkCellRenderer * const renderer_thumbnail
= GTK_CELL_RENDERER(rendererThumbnail_.gobj());
- GtkCellRenderer * const renderer_info
- = GTK_CELL_RENDERER(rendererText_.gobj());
gtk_cell_layout_pack_start(self, renderer_thumbnail, FALSE);
gtk_cell_layout_set_cell_data_func(
@@ -140,19 +136,10 @@ ThumbnailView::configure(gint thumbnail_renderer_width,
0,
0);
- gtk_cell_layout_pack_start(self, renderer_info, FALSE);
-
rendererThumbnail_.property_width().set_value(
thumbnail_renderer_width);
rendererThumbnail_.property_height().set_value(
thumbnail_renderer_height);
- rendererThumbnail_.set_extra_height(20);
-
- rendererText_.property_ellipsize_set().set_value(true);
- rendererText_.property_xalign().set_value(0.5);
- rendererText_.property_yalign().set_value(0);
- rendererText_.property_height().set_value(20);
- rendererText_.property_rise().set_value(2);
std::vector<Gtk::TargetEntry> targets;
targets.push_back(Gtk::TargetEntry("text/uri-vector",
diff --git a/src/renderer/thumbnail-view.h b/src/renderer/thumbnail-view.h
index 0de06af..643b912 100644
--- a/src/renderer/thumbnail-view.h
+++ b/src/renderer/thumbnail-view.h
@@ -87,8 +87,6 @@ class ThumbnailView :
CellRendererThumbnail rendererThumbnail_;
- Gtk::CellRendererText rendererText_;
-
private:
void
configure(gint thumbnail_width, gint thumbnail_height)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]