Make the sync result look right with any number of columns
- Visible columns share the width equally, whether one or five are shown - Long soundtrack names and errors wrap inside their column instead of widening the window, which pushed the title and Restart button out of view and cut off text - Separators only go between columns; the extra one before the first column is gone - Wider, centred panel with inner margins, and spacing above the Restart button - The Re-added header no longer reads ReAdded
This commit is contained in:
1 parent
6cbbfee6a1
commit
2a332c2d19
4 files changed
+68
-31
No files matched your search
@@ -153,3 +153,48 @@ func test_errors_section_has_errors_header() -> void:
|
||||
_finish_sync(result)
|
||||
|
||||
assert_str((_node("CatchedErrorsVBox").get_child(0) as Label).text).is_equal("Errors")
|
||||
|
||||
|
||||
func test_long_names_wrap_instead_of_widening_the_window() -> void:
|
||||
_runner.invoke("start_sync")
|
||||
var long_name: String = "The Legend of Zelda: Breath of the Wild Original Soundtrack"
|
||||
var result: Dictionary = _empty_result()
|
||||
result.soundtracks_added = [long_name]
|
||||
result.soundtracks_re_added = [long_name]
|
||||
result.soundtracks_changed_content = [long_name]
|
||||
result.soundtracks_removed = [long_name]
|
||||
result.soundtracks_changed_title = {long_name: long_name}
|
||||
result.catched_errors = [long_name + " could not be read"]
|
||||
|
||||
_finish_sync(result)
|
||||
await _runner.simulate_frames(2)
|
||||
|
||||
# The minimum width is what the content needs; wider than the panel it would stick out
|
||||
var panel_width: float = (_window.get_node("SyncPanel") as Control).size.x
|
||||
assert_float(_node("SyncHBoxContainer").get_combined_minimum_size().x) \
|
||||
.is_less(panel_width)
|
||||
assert_float(_node("CatchedErrorsVBox").get_combined_minimum_size().x) \
|
||||
.is_less(panel_width)
|
||||
|
||||
|
||||
func test_visible_columns_share_the_width_equally() -> void:
|
||||
_runner.invoke("start_sync")
|
||||
var result: Dictionary = _empty_result()
|
||||
result.soundtracks_added = ["Chrono Cross", "Xenoblade Chronicles X Original Soundtrack"]
|
||||
result.soundtracks_removed = ["Bad Rip"]
|
||||
|
||||
_finish_sync(result)
|
||||
await _runner.simulate_frames(2)
|
||||
|
||||
assert_float(_node("SoundtracksAddedVBox").size.x).is_equal_approx(
|
||||
_node("SoundtracksRemovedVBox").size.x, 1.0)
|
||||
|
||||
|
||||
func test_column_headers() -> void:
|
||||
_runner.invoke("start_sync")
|
||||
var result: Dictionary = _empty_result()
|
||||
result.soundtracks_re_added = ["Super Metroid"]
|
||||
|
||||
_finish_sync(result)
|
||||
|
||||
assert_str((_node("SoundtracksReAddedVBox").get_child(0) as Label).text).is_equal("Re-added")
|
||||
Reference in new issue
Block a user