Skip to content

Commit

Permalink
Dev/1050 (#57)
Browse files Browse the repository at this point in the history
* fix: 窗口尺寸调整

 窗口尺寸调整,从820*580调整最小尺寸为680*300。默认尺寸依然是820*580。

Log: 窗口尺寸调整

Task: https://pms.uniontech.com/task-view-108405.html
Change-Id: Ie879eb4ade4e3aa468347e1c7801b89590baf5ad

* fix: DBXC000183 华为擎云L410 klu-1040 ARM 在麒麟990机器上用字体管理器安装完长城的大小标宋后显示为韩文

 字体getFontInfo接口中获取到的familyName可能是"????",导致安装小标宋体后,无法安装大标宋体。
 故,将此前修改的获取正确名称的接口提到getFontInfo接口中执行,可保证后续程序中获取信息的正确性。

Log: DBXC000183 华为擎云L410 klu-1040 ARM 在麒麟990机器上用字体管理器安装完长城的大小标宋后显示为韩文

Bug: https://pms.uniontech.com/bug-view-122911.html
Change-Id: I3338126ceab5dc61cbc15a831075744674ff843f

* fix: 首次预览字体后关闭预览框,再次预览同一文件,预览窗口显示空白

 改写DFontWidget::sizeHint接口

Log: 首次预览字体后关闭预览框,再次预览同一文件,预览窗口显示空白

Bug: https://pms.uniontech.com/bug-view-113606.html
Change-Id: Ic868e8466721746e7df59e3985a99b2f3e755457

* fix: 窗口最小尺寸时,搜索框右侧被遮挡

 1.在init时,不要调用addwidget。 2.resize事件中动态调整搜索框的位置。

Log: 窗口最小尺寸时,搜索框右侧被遮挡

Bug: https://pms.uniontech.com/bug-view-130127.html

Change-Id: I75f2eb4c18e05ed8af37c290e525852a2cfe6818
  • Loading branch information
LiuLibang authored May 16, 2022
1 parent 212046f commit f445a8a
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion deepin-font-manager/views/dfontmgrmainwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -645,7 +645,6 @@ void DFontMgrMainWindow::initTileFrame()
d->searchFontEdit->setFixedSize(QSize(FTM_SEARCH_BAR_W, FTM_SEARCH_BAR_H));
d->searchFontEdit->setPlaceHolder(DApplication::translate("SearchBar", "Search"));

titlebar()->addWidget(d->searchFontEdit, Qt::AlignCenter);
titlebar()->addWidget(d->titleActionArea, Qt::AlignLeft | Qt::AlignVCenter);
}

Expand Down Expand Up @@ -2163,6 +2162,21 @@ void DFontMgrMainWindow::resizeEvent(QResizeEvent *event)
m_IsWindowMax = true;
}

D_D(DFontMgrMainWindow);

int w = event->size().width();
QPoint point = d->searchFontEdit->pos();
int x = point.x();
if(w >= 760){
x = (w - FTM_SEARCH_BAR_W) / 2;
}
else {
x = (760 - FTM_SEARCH_BAR_W) / 2 - (760 - w);
}
point.setX(x);
point.setY(3); // titlebar()->size(): 50px searchFontEdit->size(): 44
d->searchFontEdit->move(point);

DMainWindow::resizeEvent(event);
}

Expand Down

0 comments on commit f445a8a

Please sign in to comment.