David Catuhe 7 年之前
父节点
当前提交
704a3ac20d
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      gui/src/2D/controls/control.ts

+ 2 - 2
gui/src/2D/controls/control.ts

@@ -1283,9 +1283,9 @@ export class Control {
         }
 
         if (this._style) {
-            this._font = (this._style.fontWeight ? this._style.fontWeight : this._style.fontStyle) + " " + this.fontSizeInPixels + "px " + this._style.fontFamily;
+            this._font = this._style.fontStyle + " " + this._style.fontWeight + " " + this.fontSizeInPixels + "px " + this._style.fontFamily;
         } else {
-            this._font = (this._fontWeight ? this._fontWeight : this._fontStyle) + " " + this.fontSizeInPixels + "px " + this._fontFamily;
+            this._font = this._fontStyle + " " + this._fontWeight + " " + this.fontSizeInPixels + "px " + this._fontFamily;
         }
 
         this._fontOffset = Control._GetFontOffset(this._font);