mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 16:07:47 +00:00
centered backgrounds are now an option
This commit is contained in:
parent
aa50e5bb13
commit
da9c70598f
4 changed files with 45 additions and 5 deletions
|
@ -95,8 +95,10 @@ void WSCompositor::compose()
|
|||
m_wallpaper_mode == WallpaperMode::Unchecked) {
|
||||
m_back_painter->blit(dirty_rect.location(), *m_wallpaper, dirty_rect);
|
||||
} else if (m_wallpaper_mode == WallpaperMode::Center) {
|
||||
// TODO: Implement centered wallpaper
|
||||
m_back_painter->blit(dirty_rect.location(), *m_wallpaper, dirty_rect);
|
||||
Point offset{ ws.size().width() / 2 - m_wallpaper->size().width() / 2,
|
||||
ws.size().height() / 2 - m_wallpaper->size().height() / 2 };
|
||||
m_back_painter->blit_offset(dirty_rect.location(), *m_wallpaper,
|
||||
dirty_rect, offset);
|
||||
} else if (m_wallpaper_mode == WallpaperMode::Tile) {
|
||||
m_back_painter->blit_tiled(dirty_rect.location(), *m_wallpaper, dirty_rect);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue