Fix: Some labels can not be completely displayed in large font-size.

Link: http://172.17.66.192/biz/bug-view-43978.html
This commit is contained in:
zhangjiaping 2021-03-25 20:58:11 +08:00
parent 051a165ddc
commit def4bcb778
3 changed files with 33 additions and 26 deletions

View File

@ -730,6 +730,13 @@ void ConfForm::paintEvent(QPaintEvent *event)
KylinDBus mkylindbus;
double trans = mkylindbus.getTransparentData();
QString name = tr("Method: ");
ui->lbTxt1->setText(ui->lbTxt1->fontMetrics().elidedText(name, Qt::ElideRight, 95));
if (name != ui->lbTxt1->text()) {
ui->lbTxt1->setToolTip(tr("Method: "));
} else {
ui->lbTxt1->setToolTip("");
}
QStyleOption opt;
opt.init(this);

View File

@ -98,9 +98,9 @@
<property name="geometry">
<rect>
<x>76</x>
<y>15</y>
<width>80</width>
<height>20</height>
<y>13</y>
<width>95</width>
<height>24</height>
</rect>
</property>
<property name="font">
@ -117,9 +117,9 @@
<property name="geometry">
<rect>
<x>76</x>
<y>100</y>
<width>80</width>
<height>20</height>
<y>98</y>
<width>95</width>
<height>24</height>
</rect>
</property>
<property name="font">
@ -136,9 +136,9 @@
<property name="geometry">
<rect>
<x>76</x>
<y>145</y>
<width>80</width>
<height>20</height>
<y>143</y>
<width>95</width>
<height>24</height>
</rect>
</property>
<property name="font">
@ -155,9 +155,9 @@
<property name="geometry">
<rect>
<x>76</x>
<y>190</y>
<width>80</width>
<height>20</height>
<y>188</y>
<width>95</width>
<height>24</height>
</rect>
</property>
<property name="font">
@ -189,9 +189,9 @@
<property name="geometry">
<rect>
<x>76</x>
<y>235</y>
<width>80</width>
<height>20</height>
<y>233</y>
<width>95</width>
<height>24</height>
</rect>
</property>
<property name="font">
@ -208,9 +208,9 @@
<property name="geometry">
<rect>
<x>76</x>
<y>57</y>
<width>93</width>
<height>20</height>
<y>55</y>
<width>95</width>
<height>24</height>
</rect>
</property>
<property name="font">
@ -267,9 +267,9 @@
<property name="geometry">
<rect>
<x>76</x>
<y>125</y>
<width>80</width>
<height>20</height>
<y>123</y>
<width>95</width>
<height>24</height>
</rect>
</property>
<property name="font">
@ -286,9 +286,9 @@
<property name="geometry">
<rect>
<x>76</x>
<y>80</y>
<width>80</width>
<height>20</height>
<y>78</y>
<width>95</width>
<height>24</height>
</rect>
</property>
<property name="font">

View File

@ -102,8 +102,8 @@
#define X_BTN_FUN 360
#define Y_BTN_FUN 87 //新建网络加入网络按钮的宽高、x坐标、y坐标
#define W_NO_ITEM_TIP 235
#define H_NO_ITEM_TIP 20
#define W_NO_ITEM_TIP 240
#define H_NO_ITEM_TIP 24
#define DBUS_NAME "org.ukui.SettingsDaemon"
#define DBUS_PATH "/org/ukui/SettingsDaemon/wayland"