Jump to content

Clover Themes


Slice
1,871 posts in this topic

Recommended Posts

22 minutes ago, blackosx said:

 

Scrollbar fix is to change this line

https://sourceforge.net/p/cloverefiboot/code/4822/tree/rEFIt_UEFI/refit/menu.c#l3310

 

from:


    Total = egCreateFilledImage(ScrollTotal.Width, ScrollTotal.Height, FALSE, &MenuBackgroundPixel);

to:


    Total = egCreateFilledImage(ScrollTotal.Width, ScrollTotal.Height, TRUE, &MenuBackgroundPixel);

 

Thanks again, it solves transparent scrollbar issue (right ss) :thumbsup_anim:

VirtualBox_Clover-Bootloader_25_12_2018_04_54_19.png

  • Haha 1
Link to comment
Share on other sites

29 minutes ago, blackosx said:

Great job! emoji3.png

My test version is terrible, and I forgot applying Bevel & Emboss on it (which I believe ur design using it hah haa)

Are you sure wanna touch your PC on Xmas moment? Can't believe that is raining on a whole day here since this morning (now is evening IDN Time), unable going to anywhere then. 

os_moja.icns_bevel.zip

Edited by Badruzeus
  • Like 1
Link to comment
Share on other sites

1395974808_ScreenShot.png.3c03136615e7447b412b2604f44e32bb.png

 

Hello there, just wondering are these 2 parameters still working as such or there's been some modification to the way its done?

 

Asking this because made a few themes for my machines and those doesn't seem to apply no matter what... or did i missed something in the way?

 

pls some hints

thx.

Link to comment
Share on other sites

to follow up on 

I've conducted some initial testing for icon placement.

 

Notes for sanity:
=============
Default, in Settings.c
GlobalConfig.MainEntriesSize = 128;   <--- Overridden by theme.plist entry MainEntriesSize
row0TileSize = 144;                   <--- Overridden by theme.plist entry SelectionBigWidth
GlobalConfig.TileXSpace = 8;          <--- Overridden by theme.plist entry TileXSpace

 

Default in menu.c
#define ROW0_SCROLLSIZE (100)

 

=============

To start, I added some debug statements to current clover and also to r4875

DBG("UGAWidth =%d\n", UGAWidth);
DBG("GlobalConfig.MainEntriesSize =%d\n", GlobalConfig.MainEntriesSize);
DBG("row0TileSize =%d\n", row0TileSize);
DBG("GlobalConfig.Scale =%d\n", GlobalConfig.Scale);
DBG("EntriesGap =%d\n", EntriesGap);
DBG("EntriesWidth =%d\n", EntriesWidth);
DBG("MaxItemOnScreen =%d\n", MaxItemOnScreen);
DBG("row0Count =%d\n", row0Count);
DBG("row0PosX (Before) =%d\n", row0PosX);
DBG("row0PosY (Before) =%d\n", row0PosY);
DBG("row1PosX (Before) =%d\n", row1PosX);

      row0PosX = (UGAWidth + (GlobalConfig.TypeSVG ? EntriesGap : 8) - (EntriesWidth + EntriesGap)
                  * ((MaxItemOnScreen < row0Count)?MaxItemOnScreen:row0Count)) >> 1;
      row0PosY = (int)(((float)UGAHeight - LayoutMainMenuHeight * GlobalConfig.Scale) * 0.5f +
                  LayoutBannerOffset * GlobalConfig.Scale);
      row1PosX = (UGAWidth + 8 - (row1TileSize + (INTN)(8.0f * GlobalConfig.Scale)) * row1Count) >> 1;

DBG("row0PosX (After) =%d\n", row0PosX);
DBG("row0PosY (After) =%d\n", row0PosY);
DBG("row1PosX (After) =%d\n", row1PosX);


Then saved screenshots of DarkBootX and BGM raster themes and overlaid debug and measurements for comparison.

 

BGM has Selection_big at 144px and icons as 128px and works fine before and after commit 4785. This is how rEFIt was designed to work.

 

1520275931_3_4785_BGM_Screenshot2018-12-26at08_01_163.thumb.jpg.ad6d763b3da687dcfdd3bacd51743fed.jpg

 

DarkBootX, however, has Selection_big at 180px and icons as 160px and fails to be centered with commit 4785. This goes against rEFIt's original design intention but plays with layout options introduced in to Clover which allowed BGM256 to work.


1870523027_1_4785_Darkboot_Screenshot2018-12-26at07_53.08_3.thumb.jpg.6e489da1651744693169039556ca757a.jpg

 

 

Even though DarkbootX did render centred before commit 4785 or after r4820 the code was still incorrect as EntriesWidth was incorrect and and EntriesGap was not being seen on the screen.

 

EntriesWidth
=============
The current calculation of EntriesWidth is strange as Slice pointed out.

EntriesWidth = GlobalConfig.MainEntriesSize + (16 * row0TileSize) / 144;

BGM
EntriesWidth = 128 + (16 * 144) / 144;        = 144  <-- Ends up being same as Selection_big width

 

DarkBootX
EntriesWidth = 128 + (16 * 180) / 144;        = 148  <-- Ends up being neither Selection_big or icon width


Proposed Change 1
============

I suggest to just use row0TileSize (also SelectionBigWidth from theme.plist) for EntriesWidth.

      //EntriesWidth = GlobalConfig.MainEntriesSize + (16 * row0TileSize) / 144;
      EntriesWidth = row0TileSize;

Then centre the icons as per Slice's simple drawing above, otherwise themes such as DarkBootX will not be centered.

      //row0PosX = (UGAWidth + (GlobalConfig.TypeSVG ? EntriesGap : 8) - (EntriesWidth + EntriesGap)
      //            * ((MaxItemOnScreen < row0Count)?MaxItemOnScreen:row0Count)) >> 1;
      row0PosX = row0TileSize + EntriesGap;
      row0PosX = row0PosX * MaxItemOnScreen;
      row0PosX = row0PosX - EntriesGap;
      row0PosX = UGAWidth - row0PosX;
      row0PosX = row0PosX / 2;

Proposed Change 2 (Not done)
============

Also.. menu.c has

#define ROW0_SCROLLSIZE (100)

However, Clover does not use a scroll at either side of the icons, so why not have this setting user definable in the theme.plist? Setting this to a lower value can allow more larger icons to fit on a smaller screen for example.


Moving forward
============

One caveat is that as TileXSpace is now used properly, any themes based on BGM256 or for example DarkBootX which uses the layout options

            <key>TileXSpace</key>
            <integer>nn</integer>

will now properly have nn Gap between icons. This will need to be reduced in most instances. Here's an image showing BGM256 with three different TileXSpace values.

 

screenshot_BGM256_TileXSpace_diffs.thumb.jpg.57c5c7fea62802da8dfeaa88d7287a7b.jpg

 

Also, for now with Clovy theme only when SelectionOnTop="0", the selector draws the selected icon in a different position. This needs to be addressed next..

 

Here's a test build for testing:

CLOVERX64.efi.zip

 

Edited by blackosx
  • Like 1
  • Thanks 1
Link to comment
Share on other sites

On 12/26/2018 at 10:18 AM, SavageAUS said:

What's up with the line down the middle?



screenshot1.thumb.png.f23275ecfee7e8ba3a3c22c86d64459c.png

 

What can I say, "InsanelyLook" (and also "Carbon") theme use:

		<key>Background</key>
		<dict>
			...
			<key>Type</key>
			<string>Tile</string>
		</dict>

.. and provided *.png is 1080p (why I limited into this size on Theme's Description), while your display is 1440p.

You could change it to "Type=Scale" though I'm not sure about Layout potitioning related to "background".

The easier is using another background image, not should be 1440p or larger but whatever it fits the Display with "Type=Scale". Yeah, these themes are bad on this part, I could provide an alternate bkg later but honestly.. I lost my interest using fixed background since Vector theme arrived hah haa.

 

No idea with your 2nd screenshot, are you using vector theme then switched to Raster? About Banner positioning is just previous posts back on this thread, I guess. 

Link to comment
Share on other sites

8 hours ago, blackosx said:

Here's a test build for testing:

CLOVERX64.efi.zip

Here's my report;

Using your r4824 (test); both Raster & Vector theme with 128px icons as MainEntries would be alligned to the left side. Tested using Clovy and Mojave theme (No Layout customized, standard):

 

Clovy
VirtualBox_Clover Bootloader_27_12_2018_20_10_34.png

Mojave
VirtualBox_Clover Bootloader_27_12_2018_20_17_13.png
 

 

 

Any themes with bigger than 128px icons size however; are well alligned, but "TileXSpace" becomes too large: (Using Lightness256 here)

 

 

Lightness256
VirtualBox_Clover Bootloader_27_12_2018_20_22_54.png

 

Edited by Badruzeus
  • Like 1
Link to comment
Share on other sites

This is very old bug/absent feature in DrawMainMenuEntries->BltImageCompositeBadge()

Quote

  //to simplify suppose square images

Clovy theme has non-square images so we see shifting when selected.

 

  • Like 1
Link to comment
Share on other sites

1 hour ago, Badruzeus said:

Here's my report;

Using your r4824 (test); both Raster & Vector theme with 128px icons as MainEntries would be alligned to the left side. Tested using Clovy and Mojave theme (No Layout customized, standard):

  Reveal hidden contents

Clovy
VirtualBox_Clover Bootloader_27_12_2018_20_10_34.png

Mojave
VirtualBox_Clover Bootloader_27_12_2018_20_17_13.png
 

 

 

Any themes with bigger than 128px icons size however; are well alligned, but "TileXSpace" becomes too large: (Using Lightness256 here)

 

  Reveal hidden contents

Lightness256
VirtualBox_Clover Bootloader_27_12_2018_20_22_54.png

 

 

Thanks for testing and thanks for the report.

 

Can you try this version with added debug statements to show me what's happening? I'm sure you know, but add the following to your config.plist

    <key>Boot</key>
    <dict>
      <key>Debug</key>
      <true/>
    </dict>

debug.log will be written to /EFI/Clover/misc

 

CLOVERX64_DEBUG.zip

  • Like 1
Link to comment
Share on other sites

49 minutes ago, blackosx said:

Can you try this version with added debug statements to show me what's happening? I'm sure you know, but add the following to your config.plist


    <key>Boot</key>
    <dict>
      <key>Debug</key>
      <true/>
    </dict>

 

debug.log attached

debug.log_gt520_r4824.zip

  • Like 1
Link to comment
Share on other sites

5 hours ago, blackosx said:

Hi Sherlock’s
I’ll fix it soon. Thanks for the reminder.

Done. See latest commit.

Credit Badruzeus for Moja icon.

Hope all is okay as not tested.

 

10 minutes ago, Badruzeus said:

Much better with 128px themes (centered postition), except theme that use bigger icons it has still.. too large TileXSpace.   

debug.log_r4824_test2.zip

 

Great. Thanks for the feedback.

Did you try reducing TileXSpace?

 

Quote

 

Moving forward
============

One caveat is that as TileXSpace is now used properly, any themes based on BGM256 or for example DarkBootX which uses the layout options


            <key>TileXSpace</key>
            <integer>nn</integer>

will now properly have nn Gap between icons. This will need to be reduced in most instances. Here's an image showing BGM256 with three different TileXSpace values.

 

 

Edited by blackosx
  • Like 1
Link to comment
Share on other sites

×
×
  • Create New...