[longomatch] Add new constants for the icons width/heigth
- From: Andoni Morales Alastruey <amorales src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [longomatch] Add new constants for the icons width/heigth
- Date: Mon, 7 Jul 2014 11:18:48 +0000 (UTC)
commit 9bf004e741aa983bb14cc82da213267b4bae3e27
Author: Andoni Morales Alastruey <ylatuya gmail com>
Date: Thu Mar 20 16:41:53 2014 +0100
Add new constants for the icons width/heigth
LongoMatch.Core/Common/Constants.cs | 8 ++++----
LongoMatch.Core/Common/Image.cs | 2 +-
LongoMatch.Core/Store/PixbufTimeNode.cs | 6 +++---
LongoMatch.Services/Services/ToolsManager.cs | 5 +++--
4 files changed, 11 insertions(+), 10 deletions(-)
---
diff --git a/LongoMatch.Core/Common/Constants.cs b/LongoMatch.Core/Common/Constants.cs
index ada0bc8..e012054 100644
--- a/LongoMatch.Core/Common/Constants.cs
+++ b/LongoMatch.Core/Common/Constants.cs
@@ -71,10 +71,6 @@ Pavel Bárta (cs)
Petr Kovar (cs)
Xavier Queralt Mateu (ca)";
- public const int THUMBNAIL_MAX_WIDTH = 100;
-
- public const int THUMBNAIL_MAX_HEIGHT = 100;
-
public const string WEBSITE = "http://www.longomatch.ylatuya.es";
public const string MANUAL = "http://www.longomatch.ylatuya.es/documentation/manual.html";
@@ -107,5 +103,9 @@ Xavier Queralt Mateu (ca)";
public const int DB_MAYOR_VERSION = 3;
public const int DB_MINOR_VERSION = 1;
+
+ public const int MAX_PLAYER_ICON_SIZE = 100;
+ public const int MAX_SHIELD_ICON_SIZE = 100;
+ public const int MAX_THUMBNAIL_SIZE = 100;
}
}
diff --git a/LongoMatch.Core/Common/Image.cs b/LongoMatch.Core/Common/Image.cs
index f4acb84..571fd44 100644
--- a/LongoMatch.Core/Common/Image.cs
+++ b/LongoMatch.Core/Common/Image.cs
@@ -49,7 +49,7 @@ namespace LongoMatch.Common
}
public void Scale() {
- Scale (Constants.THUMBNAIL_MAX_WIDTH, Constants.THUMBNAIL_MAX_HEIGHT);
+ Scale (Constants.MAX_THUMBNAIL_SIZE, Constants.MAX_THUMBNAIL_SIZE);
}
// this constructor is automatically called during deserialization
diff --git a/LongoMatch.Core/Store/PixbufTimeNode.cs b/LongoMatch.Core/Store/PixbufTimeNode.cs
index c21aec2..5902f3f 100644
--- a/LongoMatch.Core/Store/PixbufTimeNode.cs
+++ b/LongoMatch.Core/Store/PixbufTimeNode.cs
@@ -53,9 +53,9 @@ namespace LongoMatch.Store
if (value == null)
thumbnailBuf = null;
else {
- if (value.Height > Constants.THUMBNAIL_MAX_HEIGHT ||
- value.Width > Constants.THUMBNAIL_MAX_WIDTH) {
- value.Scale(Constants.THUMBNAIL_MAX_WIDTH,
Constants.THUMBNAIL_MAX_HEIGHT);
+ if (value.Height > Constants.MAX_THUMBNAIL_SIZE ||
+ value.Width > Constants.MAX_THUMBNAIL_SIZE) {
+ value.Scale(Constants.MAX_THUMBNAIL_SIZE,
Constants.MAX_THUMBNAIL_SIZE);
}
thumbnailBuf = value.Serialize();
}
diff --git a/LongoMatch.Services/Services/ToolsManager.cs b/LongoMatch.Services/Services/ToolsManager.cs
index 9c75616..6b91c62 100644
--- a/LongoMatch.Services/Services/ToolsManager.cs
+++ b/LongoMatch.Services/Services/ToolsManager.cs
@@ -156,8 +156,9 @@ namespace LongoMatch.Services {
try {
capturer.SeekTime(play.Start.MSeconds + ((play.Stop -
play.Start).MSeconds/2),
true);
- play.Miniature =
capturer.GetCurrentFrame(Constants.THUMBNAIL_MAX_WIDTH,
- Constants.THUMBNAIL_MAX_HEIGHT);
+ play.Miniature = capturer.GetCurrentFrame (
+ Constants.MAX_THUMBNAIL_SIZE,
+ Constants.MAX_THUMBNAIL_SIZE);
dialog.Pulse();
} catch (Exception ex) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]