mirror of
https://github.com/KDE/latte-dock.git
synced 2025-08-25 01:49:30 +03:00
fix notifications placement for sidebars
--Corona::availableScreenRe.. functions now ignore visibility modes from views that are almost always hidden such as SideBars and AutoHide panels/docks
This commit is contained in:
@ -518,8 +518,17 @@ Layout::GenericLayout *Corona::layout(QString name) const
|
||||
}
|
||||
|
||||
QRegion Corona::availableScreenRegion(int id) const
|
||||
{
|
||||
return availableScreenRegionWithCriteria(id);
|
||||
{
|
||||
//! ignore modes are added in order for notifications to be placed
|
||||
//! in better positioning and not overlap with sidebars or usually hidden views
|
||||
QList<Types::Visibility> ignoremodes({Latte::Types::AutoHide,
|
||||
Latte::Types::SidebarOnDemand,
|
||||
Latte::Types::SidebarAutoHide});
|
||||
|
||||
|
||||
return availableScreenRegionWithCriteria(id,
|
||||
QString(),
|
||||
ignoremodes);
|
||||
}
|
||||
|
||||
QRegion Corona::availableScreenRegionWithCriteria(int id,
|
||||
@ -713,7 +722,15 @@ QRegion Corona::availableScreenRegionWithCriteria(int id,
|
||||
|
||||
QRect Corona::availableScreenRect(int id) const
|
||||
{
|
||||
return availableScreenRectWithCriteria(id);
|
||||
//! ignore modes are added in order for notifications to be placed
|
||||
//! in better positioning and not overlap with sidebars or usually hidden views
|
||||
QList<Types::Visibility> ignoremodes({Latte::Types::AutoHide,
|
||||
Latte::Types::SidebarOnDemand,
|
||||
Latte::Types::SidebarAutoHide});
|
||||
|
||||
return availableScreenRectWithCriteria(id,
|
||||
QString(),
|
||||
ignoremodes);
|
||||
}
|
||||
|
||||
QRect Corona::availableScreenRectWithCriteria(int id,
|
||||
|
Reference in New Issue
Block a user