HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

Theme screenshots in wrong ratio

Okay, to be honest, this is not really worth its own thread, but still it jumped in my eye.

200x135 (ratio 40:27)
But shown is 150x112 (ratio 75:56)

When using a width of 150 the height needs to be 101px

Now this is really just a tiny bug

Tagged:

Comments

  • hgtonighthgtonight MVP
    edited May 2014

    Looks like the view sets that aspect ratio explicitly as attributes in the img tag. This should probably be done via CSS.

    You should submit a bug report on GitHub here: https://github.com/vanillaforums/vanilla/issues

    EDIT - I have a patch below:

    --- applications/dashboard/design/admin.css Thu Jan 15 03:13:00 1970
    +++ applications/dashboard/design/admin.css Thu Jan 15 03:13:00 1970
    @@ -1468,6 +1468,7 @@
     div.CurrentTheme img,
     div.BrowseThemes img {
        border: 1px solid #777;
    +   width: 150px;
     }
     div.CurrentTheme h3,
     div.BrowseThemes h3 {
    @@ -1487,7 +1488,8 @@
     .CurrentTheme h4 span {
        padding-left: 10px;
     }
    -div.Description {
    +div.Description,
    +div.Requirements {
        padding: 0 20px 20px;
     }
     div.Options,
    --- applications/dashboard/views/settings/themes.php    Thu Jan 15 03:13:00 1970
    +++ applications/dashboard/views/settings/themes.php    Thu Jan 15 03:13:00 1970
    @@ -45,7 +45,7 @@
    
        $PreviewUrl = $this->Data('EnabledTheme.ScreenshotUrl', FALSE);
        if ($PreviewUrl !== FALSE)
    -      echo Img($PreviewUrl, array('alt' => $this->Data('EnabledThemeName'), 'height' => '112', 'width' => '150'));
    +      echo Img($PreviewUrl, array('alt' => $this->Data('EnabledThemeName')));
    
        echo '<h4>';
        echo $ThemeUrl != '' ? Url($this->Data('EnabledThemeName'), $ThemeUrl) : $this->Data('EnabledThemeName');
    @@ -144,7 +144,7 @@
                       echo '</h4>';
    
                       if ($PreviewUrl !== FALSE) {
    -                     echo Anchor(Img($PreviewUrl, array('alt' => $ScreenName, 'height' => '112', 'width' => '150')),
    +                     echo Anchor(Img($PreviewUrl, array('alt' => $ScreenName)),
                             'dashboard/settings/previewtheme/'.$ThemeName,
                             '',
                             array('target' => '_top')
    

    Search first

    Check out the Documentation! We are always looking for new content and pull requests.

    Click on insightful, awesome, and funny reactions to thank community volunteers for their valuable posts.

  • Thanks .. I'm going to do that (why didn't I do that straight from the beginning?!)

Sign In or Register to comment.