mirror of
https://github.com/SpartanJ/eepp.git
synced 2026-10-01 18:50:16 +03:00
eterm: Use usable bounds instead of display bounds for window sizing.
This commit is contained in:
@@ -280,12 +280,12 @@ EE_MAIN_FUNC int main( int argc, char* argv[] ) {
|
||||
defaultResourceScope().getFontService().setAntialiasing( fontAntialiasing.Get() );
|
||||
|
||||
Sizei winSize( width.Get(), height.Get() );
|
||||
auto displaySize( currentDisplay->getUsableBounds().getSize() );
|
||||
if ( displaySize.getWidth() > 0 && winSize.getWidth() >= displaySize.getWidth() )
|
||||
winSize.setWidth( static_cast<int>( displaySize.getWidth() * 0.8 ) );
|
||||
|
||||
if ( winSize.getWidth() >= currentDisplay->getBounds().getWidth() )
|
||||
winSize.setWidth( static_cast<int>( currentDisplay->getBounds().getWidth() * 0.8 ) );
|
||||
|
||||
if ( winSize.getHeight() >= currentDisplay->getBounds().getHeight() )
|
||||
winSize.setHeight( static_cast<int>( currentDisplay->getBounds().getHeight() * 0.75 ) );
|
||||
if ( displaySize.getHeight() > 0 && winSize.getHeight() >= displaySize.getHeight() )
|
||||
winSize.setHeight( static_cast<int>( displaySize.getHeight() * 0.75 ) );
|
||||
|
||||
win = Engine::instance()->createWindow(
|
||||
WindowSettings( winSize.getWidth(), winSize.getHeight(), "eterm", WindowStyle::Default,
|
||||
|
||||
Reference in New Issue
Block a user