[gnome-characters] Revert "characterList: Make resizing more flexible"
- From: Daiki Ueno <dueno src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-characters] Revert "characterList: Make resizing more flexible"
- Date: Mon, 2 Mar 2015 13:13:49 +0000 (UTC)
commit f8c725ad852177033a4e761b488a94d53494da5d
Author: Daiki Ueno <dueno src gnome org>
Date: Mon Mar 2 22:10:04 2015 +0900
Revert "characterList: Make resizing more flexible"
This reverts commit b6400ddda71b020107525fd7f2db6c30ba1c1f34.
src/characterList.js | 13 ++++---------
1 files changed, 4 insertions(+), 9 deletions(-)
---
diff --git a/src/characterList.js b/src/characterList.js
index 69d9bab..599c9c9 100644
--- a/src/characterList.js
+++ b/src/characterList.js
@@ -32,7 +32,6 @@ const Util = imports.util;
const BASELINE_OFFSET = 0.85;
const CELLS_PER_ROW = 5;
const NUM_ROWS = 5;
-const NUM_COLUMNS = 5;
const CELL_SIZE = 50;
function getCellSize(fontDescription) {
@@ -122,10 +121,8 @@ const CharacterListWidget = new Lang.Class({
},
vfunc_get_preferred_height_for_width: function(width) {
- let cellSize = getCellSize(this._fontDescription);
- let natHeight = Math.max(this._rows.length, NUM_ROWS) * cellSize;
- let minHeight = NUM_ROWS * cellSize;
- return [minHeight, natHeight];
+ let height = Math.max(this._rows.length, NUM_ROWS) * getCellSize(this._fontDescription);
+ return [height, height];
},
vfunc_get_preferred_width: function() {
@@ -133,10 +130,8 @@ const CharacterListWidget = new Lang.Class({
},
vfunc_get_preferred_width_for_height: function(height) {
- let cellSize = getCellSize(this._fontDescription);
- let natWidth = Math.max(this._cellsPerRow, NUM_COLUMNS) * cellSize;
- let minWidth = NUM_COLUMNS * cellSize;
- return [minWidth, natWidth];
+ let width = this._cellsPerRow * getCellSize(this._fontDescription);
+ return [width, width];
},
vfunc_size_allocate: function(allocation) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]