fu: Close-up of Fu, bringing a scoop of water to her mouth (Default)
fu ([personal profile] fu) wrote in [site community profile] changelog2011-04-18 05:29 am

[dw-free] Add "icon scaling" to customize options

[commit: http://hg.dwscoalition.org/dw-free/rev/f3d2493c9451]

http://bugs.dwscoalition.org/show_bug.cgi?id=3495

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

Patch by [personal profile] ninetydegrees.

Files modified:
  • bin/upgrading/s2layers/core2.s2
  • bin/upgrading/s2layers/core2base/layout.s2
  • cgi-bin/LJ/S2/EntryPage.pm
--------------------------------------------------------------------------------
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;
--------------------------------------------------------------------------------

Post a comment in response:

This account has disabled anonymous posting.
If you don't have an account you can create one now.
HTML doesn't work in the subject.
More info about formatting

If you are unable to use this captcha for any reason, please contact us by email at support@dreamwidth.org