[solang] Tweaked the ThumbnailView
- From: Debarshi Ray <debarshir src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [solang] Tweaked the ThumbnailView
- Date: Sun, 7 Feb 2010 01:15:25 +0000 (UTC)
commit bb445a3024f92374a9e319ed65c704694c4b7240
Author: Debarshi Ray <rishi gnu org>
Date: Fri Feb 5 04:10:50 2010 +0200
Tweaked the ThumbnailView
+ The frame is now 6 pixels wide. The BrowserRenderer only bothers
about the width and height of the CellRendererThumbnail and not the
actual dimensions of the thumbnails.
+ Reduced the row and column spacing to 1.
src/renderer/browser-renderer.cpp | 20 ++++++++++----------
src/renderer/cell-renderer-thumbnail.cpp | 4 ++--
src/renderer/thumbnail-view.cpp | 4 ++--
3 files changed, 14 insertions(+), 14 deletions(-)
---
diff --git a/src/renderer/browser-renderer.cpp b/src/renderer/browser-renderer.cpp
index 8c7df48..dc32210 100644
--- a/src/renderer/browser-renderer.cpp
+++ b/src/renderer/browser-renderer.cpp
@@ -47,15 +47,15 @@ static const guint initialZoomValue
+ (higherZoomValue - lowerZoomValue) / 2;
static const guint stepZoomValue = 5;
-static const gint thumbnailRendererWidth = 168;
-static const gint thumbnailRendererHeight = 130;
+static const gint thumbnailRendererWidth = 156;
+static const gint thumbnailRendererHeight = 118;
static const double ratioWidth
- = static_cast<double>(thumbnailRendererWidth - 12)
- / static_cast<double>(initialZoomValue);
+ = static_cast<double>(thumbnailRendererWidth)
+ / static_cast<double>(initialZoomValue);
static const double ratioHeight
- = static_cast<double>(thumbnailRendererHeight - 12)
- / static_cast<double>(initialZoomValue);
+ = static_cast<double>(thumbnailRendererHeight)
+ / static_cast<double>(initialZoomValue);
static const std::string uiFile
= PACKAGE_DATA_DIR"/"PACKAGE_TARNAME"/ui/"
@@ -777,17 +777,17 @@ BrowserRenderer::reload() throw()
void
BrowserRenderer::set_thumbnail_size() throw()
{
- const guint thumbnail_width
+ const guint thumbnail_renderer_width
= static_cast<guint>(
ratioWidth
* static_cast<double>(zoomValue_));
- const guint thumbnail_height
+ const guint thumbnail_renderer_height
= static_cast<guint>(
ratioHeight
* static_cast<double>(zoomValue_));
- thumbnailView_.set_thumbnail_width(thumbnail_width + 6);
- thumbnailView_.set_thumbnail_height(thumbnail_height + 6);
+ thumbnailView_.set_thumbnail_width(thumbnail_renderer_width);
+ thumbnailView_.set_thumbnail_height(thumbnail_renderer_height);
}
void
diff --git a/src/renderer/cell-renderer-thumbnail.cpp b/src/renderer/cell-renderer-thumbnail.cpp
index 9cc2ff4..aa4085f 100644
--- a/src/renderer/cell-renderer-thumbnail.cpp
+++ b/src/renderer/cell-renderer-thumbnail.cpp
@@ -133,8 +133,8 @@ CellRendererThumbnail::render_vfunc(
{
if (0 == property_pixbuf().get_value())
{
- create_thumbnail(cell_area.get_height() - 12,
- cell_area.get_width() - 12);
+ create_thumbnail(cell_area.get_height() - 6,
+ cell_area.get_width() - 6);
}
if (0 == (flags & (Gtk::CELL_RENDERER_SELECTED
diff --git a/src/renderer/thumbnail-view.cpp b/src/renderer/thumbnail-view.cpp
index 13529f9..7e326d4 100644
--- a/src/renderer/thumbnail-view.cpp
+++ b/src/renderer/thumbnail-view.cpp
@@ -111,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(6);
- set_row_spacing(6);
+ set_column_spacing(1);
+ set_row_spacing(1);
set_has_tooltip(true);
actionGroup_->add(Gtk::Action::create("ActionOpenWithMenu",
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]