summaryrefslogtreecommitdiff
path: root/utils/modules
diff options
context:
space:
mode:
authordeva <deva>2010-02-23 13:01:41 +0000
committerdeva <deva>2010-02-23 13:01:41 +0000
commite55474c652add389d35aaa079b4fb240df1eb1a2 (patch)
treebd98aacbc8840ff1848d6503f047c874ab296432 /utils/modules
parentb3b650fded1f3206754aed00a78a30c916f5c765 (diff)
Add navicon size parameters.
Diffstat (limited to 'utils/modules')
-rw-r--r--utils/modules/gallery.php15
1 files changed, 13 insertions, 2 deletions
diff --git a/utils/modules/gallery.php b/utils/modules/gallery.php
index d2b751c..0f82c05 100644
--- a/utils/modules/gallery.php
+++ b/utils/modules/gallery.php
@@ -246,6 +246,8 @@ class Gallery {
private $albums = array();
// Local attributes
+ private $maxwidth_navicon;
+ private $maxheight_navicon;
private $maxwidth_icon;
private $maxheight_icon;
private $maxwidth_rand;
@@ -289,6 +291,8 @@ class Gallery {
{
switch($action) {
case "store":
+ $this->maxwidth_navicon = $vars['maxwidth_navicon'];
+ $this->maxheight_navicon = $vars['maxheight_navicon'];
$this->maxwidth_icon = $vars['maxwidth_icon'];
$this->maxheight_icon = $vars['maxheight_icon'];
$this->maxwidth_rand = $vars['maxwidth_rand'];
@@ -298,6 +302,8 @@ class Gallery {
$this->write();
default:
$form = new Form("store");
+ $form->addWidget(new LineEdit("NavIcon maxwidth:", "maxwidth_navicon", $this->maxwidth_navicon));
+ $form->addWidget(new LineEdit("NavIcon maxheight:", "maxheight_navicon", $this->maxheight_navicon));
$form->addWidget(new LineEdit("Icon maxwidth:", "maxwidth_icon", $this->maxwidth_icon));
$form->addWidget(new LineEdit("Icon maxheight:", "maxheight_icon", $this->maxheight_icon));
$form->addWidget(new LineEdit("Random maxwidth:", "maxwidth_rand", $this->maxwidth_rand));
@@ -416,7 +422,7 @@ class Gallery {
case "randomimage":
return new ImageSize($this->maxwidth_rand, $this->maxheight_rand);
case "navicon":
- return new ImageSize($this->maxwidth_icon * 0.7, $this->maxheight_icon * 0.7);
+ return new ImageSize($this->maxwidth_navicon, $this->maxheight_navicon);
default:
case "albumicon":
return new ImageSize($this->maxwidth_icon, $this->maxheight_icon);
@@ -428,7 +434,9 @@ class Gallery {
$fp = fopen($this->file, "w");
fwrite($fp, "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n");
- fwrite($fp, "<gallery maxwidth_icon=\"".$this->maxwidth_icon."\"\n");
+ fwrite($fp, "<gallery maxwidth_navicon=\"".$this->maxwidth_navicon."\"\n");
+ fwrite($fp, " maxheight_navicon=\"".$this->maxheight_navicon."\"\n");
+ fwrite($fp, " maxwidth_icon=\"".$this->maxwidth_icon."\"\n");
fwrite($fp, " maxheight_icon=\"".$this->maxheight_icon."\"\n");
fwrite($fp, " maxwidth_rand=\"".$this->maxwidth_rand."\"\n");
fwrite($fp, " maxheight_rand=\"".$this->maxheight_rand."\"\n");
@@ -452,6 +460,9 @@ class Gallery {
$gallery = $dom->documentElement;
+ $this->maxwidth_navicon = $gallery->getAttribute('maxwidth_navicon');
+ $this->maxheight_navicon = $gallery->getAttribute('maxheight_navicon');
+
$this->maxwidth_icon = $gallery->getAttribute('maxwidth_icon');
$this->maxheight_icon = $gallery->getAttribute('maxheight_icon');