Flyer53 / jsPanel4

A JavaScript library to create highly configurable floating panels, modals, tooltips, hints/notifiers/alerts or contextmenus for use in backend solutions and other web applications.
https://jspanel.de/
Other
313 stars 57 forks source link

Font and icon size of minimized panel replacement #186

Closed MadTomT closed 2 years ago

MadTomT commented 2 years ago

Hi,

I'm creating my panel and have set headerControls: 'xs', this looks fine apart from when the panel is minimised the the font and icons appear larger not xs.

Have I missed a setting ?

Thanks

Flyer53 commented 2 years ago

Hi there, No, you don't miss anything. It's just that the minimized replacements always have the same size regardless of the setting for the header controls. In cases where more than one panel is used and the panels have different size settings for the controls it wouldn't look that well visually if the minimized replacements had different sizes also.

Do all your panel use the same setting for headerControls concerning their size? Then I might have a simple hack for you.

MadTomT commented 2 years ago

Hi, All the panels are using the same headerControls setting. Thanks

Flyer53 commented 2 years ago

Ok, try adding the following rules to your the css

#jsPanel-replacement-container {
    transform-origin: bottom left;
    transform: scale(0.8); // with a scale value fitting your needs
}

This scales down the entire container for the minimized panel replacements including its content. Should work quite well when all your panel controls have the same size setting.

MadTomT commented 2 years ago

Sorry for the delay replying. I'm away for a few days but will try this as soon as I can. Thanks

MadTomT commented 2 years ago

Thanks this is working perfectly. :)