Column constraints not working under certain circumstances

オープン
#23 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
30/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
java
領域
design, frontend

調査の方向性

Start with the referenced layout in overrides/engine/ui/ingame/deathScreen.ui, especially the two MigLayout sections and the row containing the team image and label. Trace how MigLayout handles ColumnConstrains, cell sizing, and UISpace sizing in TeraNUI, then reproduce the reported layout with a focused test or example. Done means column widths can be constrained as intended without using repeated UISpaces.

索引モデルが issue の本文から書いたものです。

説明

Revive: Keep Status: Needs Investigation Type: Bug

Description

The issue appeared while I was trying to set column constrains for the row with the team names at the Game Over Screen. My goal was to set widths for each of the two columns (the first column contains the UIImage and second the UILabel), reaching the following result:

What worked

I pilled up many UISpaces in the same line, which ended up squishing the rest of the elements to the side.
https://github.com/Terasology/LightAndShadow/blob/develop/overrides/engine/ui/ingame/deathScreen.ui#L131-L162

                      {
                        "type": "UISpace",
                        "cc": ""
                      },
                      {
                        "type": "UISpace",
                        "cc": ""
                      },
                      {
                        "type": "UISpace",
                        "cc": ""
                      },
                      {
                        "type": "UISpace",
                        "cc": ""
                      },
                      {
                        "type": "UISpace",
                        "cc": ""
                      },
                      {
                        "type": "UISpace",
                        "cc": ""
                      },
                      {
                        "type": "UISpace",
                        "cc": ""
                      },
                      {
                        "type": "UISpace",
                        "cc": ""
                      },

image

What didn't work
  • Set a "width" at the UISpace
  • Set ColumnConstrains at the MigLayout
  • Place them in a RowLayout, and tried to modify that RowLayout
  • Use "span 8" at the UISpace to span it 8 cells
  • Use "cell [column] [row] [width] [height]" where the "[ ]" contain numbers, the cells were arranged correctly, but the width and height didn't change
  • Removed the "dock south" from the second MigLayout (L167) and placed it at the bottom with a width 3 and re-done the above methods, all failed

Failed result:
image

主要言語
Java
スター
4
フォーク
11
平均マージ
1日 22時間
マージ済み PR(30日)
3

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

MovingBlocks/TeraNUI のほかの issue

MovingBlocks/TeraNUI の issue をすべて見る

似ている issue

Java の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。