Add option "smaller" for comment userpic sizes. Previously: full = 
100%, small = 50%; now: full = 100%, small = 75%; smaller = 50%

        Patch by ninetydegrees. 

diffs (44 lines):

diff -r a4dc459038d1 -r f3d2493c9451 bin/upgrading/s2layers/core2.s2
--- a/bin/upgrading/s2layers/core2.s2   Mon Apr 18 13:18:01 2011 +0800
+++ b/bin/upgrading/s2layers/core2.s2   Mon Apr 18 13:29:19 2011 +0800
@@ -1293,10 +1293,10 @@ property bool tags_aware {
 }
 
 property string comment_userpic_style {
-   des = "User icon display style for comments";
-   doc = "User icon display style for comments.  Either '' for full, 'small' 
for small, or 'off' for none.";
+   des = "Select the size of icons in comments";
+   doc = "Either '' for 100%, 'small' for 75% and 'smaller' for 50%";
    doc_flags = "[construct]";
-   values = "|Full|small|Small|off|Off";
+   values = "|Full|small|Small|smaller|Smaller";
 }
 
 property string userpics_position {
diff -r a4dc459038d1 -r f3d2493c9451 bin/upgrading/s2layers/core2base/layout.s2
--- a/bin/upgrading/s2layers/core2base/layout.s2        Mon Apr 18 13:18:01 
2011 +0800
+++ b/bin/upgrading/s2layers/core2base/layout.s2        Mon Apr 18 13:29:19 
2011 +0800
@@ -14,6 +14,7 @@ propgroup presentation {
     property use tags_page_type;
     property use sidebar_width;
     property use sidebar_width_doubled;
+    property use comment_userpic_style;
     property use userpics_position;
     property use entry_metadata_position;
     property use use_custom_friend_colors;
diff -r a4dc459038d1 -r f3d2493c9451 cgi-bin/LJ/S2/EntryPage.pm
--- a/cgi-bin/LJ/S2/EntryPage.pm        Mon Apr 18 13:18:01 2011 +0800
+++ b/cgi-bin/LJ/S2/EntryPage.pm        Mon Apr 18 13:29:19 2011 +0800
@@ -181,6 +181,12 @@ sub EntryPage
                 my $height = $pic->{height};
                 
                 if ( $comment_userpic_style eq 'small' )
+                {
+                    $width = $width * 3 / 4;
+                    $height = $height * 3 / 4;
+                }
+
+                if ( $comment_userpic_style eq 'smaller' )
                 {
                     $width = $width / 2;
                     $height = $height / 2;
_______________________________________________
dw-changelog mailing list
[email protected]
http://lists.dwscoalition.org/mailman/listinfo/dw-changelog

Reply via email to