mirror of
https://github.com/linuxdeepin/dde-dock.git
synced 2025-06-04 09:23:03 +00:00
fix window position
Change-Id: I0f1acdc77e2738008bd8d06924b4a81bab751e08
This commit is contained in:
parent
b4b28d499a
commit
78114a1fea
@ -37,6 +37,7 @@ void ThemeAppIcon::gtkInit(){
|
||||
|
||||
QPixmap ThemeAppIcon::getIconPixmap(QString iconPath, int width, int height){
|
||||
Q_ASSERT(false);
|
||||
|
||||
if (iconPath.length() == 0){
|
||||
iconPath = "application-x-desktop";
|
||||
}
|
||||
@ -128,6 +129,8 @@ QPixmap ThemeAppIcon::getIcon(const QString iconName, const int size)
|
||||
QString fileName = getThemeIconPath(iconName, size);
|
||||
if (fileName.isEmpty())
|
||||
fileName = getThemeIconPath("application-x-desktop", size);
|
||||
if (iconName.startsWith("data:image/"))
|
||||
fileName = iconName;
|
||||
|
||||
QPixmap pixmap;
|
||||
if (fileName.startsWith("data:image/")) {
|
||||
|
@ -183,13 +183,13 @@ void MainWindow::updateGeometry()
|
||||
switch (position)
|
||||
{
|
||||
case Top:
|
||||
move(primaryRect.topLeft().x() + offsetX, 0); break;
|
||||
move(primaryRect.topLeft().x() + offsetX, primaryRect.y()); break;
|
||||
case Left:
|
||||
move(primaryRect.topLeft().x(), offsetY); break;
|
||||
move(primaryRect.topLeft().x(), primaryRect.y() + offsetY); break;
|
||||
case Right:
|
||||
move(primaryRect.right() - size.width() + 1, offsetY); break;
|
||||
move(primaryRect.right() - size.width() + 1, primaryRect.y() + offsetY); break;
|
||||
case Bottom:
|
||||
move(offsetX, primaryRect.bottom() - size.height() + 1); break;
|
||||
move(primaryRect.x() + offsetX, primaryRect.bottom() - size.height() + 1); break;
|
||||
default:
|
||||
Q_ASSERT(false);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user