Now the table header gets scrolled with the rest of the table even when using the bottom scrollbar.

This commit is contained in:
Relintai 2023-10-09 15:42:57 +02:00
parent 3240a56aa6
commit 37cc7d275c
2 changed files with 11 additions and 5 deletions

View File

@ -12,6 +12,7 @@ export(Array, Script) var cell_editor_classes := []
export var path_folder_path := NodePath("") export var path_folder_path := NodePath("")
export var path_recent_paths := NodePath("") export var path_recent_paths := NodePath("")
export var path_table_root := NodePath("") export var path_table_root := NodePath("")
export var path_table_root_scroll_container := NodePath("")
export var path_property_editors := NodePath("") export var path_property_editors := NodePath("")
export var path_columns := NodePath("") export var path_columns := NodePath("")
export var path_hide_columns_button := NodePath("") export var path_hide_columns_button := NodePath("")
@ -79,6 +80,10 @@ func _ready():
if recent_paths.size() > 0: if recent_paths.size() > 0:
display_folder(recent_paths[0], "resource_name", false, true) display_folder(recent_paths[0], "resource_name", false, true)
var sc : ScrollContainer = get_node(path_table_root_scroll_container) as ScrollContainer
sc.get_h_scrollbar().connect(@"scrolling", self, @"_update_scroll")
func _on_filesystem_changed(): func _on_filesystem_changed():

View File

@ -20,7 +20,7 @@
[ext_resource path="res://addons/resources_speadsheet_view/import_export/import_export_dialog.tscn" type="PackedScene" id=18] [ext_resource path="res://addons/resources_speadsheet_view/import_export/import_export_dialog.tscn" type="PackedScene" id=18]
[ext_resource path="res://addons/resources_speadsheet_view/selection_actions.tscn" type="PackedScene" id=19] [ext_resource path="res://addons/resources_speadsheet_view/selection_actions.tscn" type="PackedScene" id=19]
[sub_resource type="Image" id=3] [sub_resource type="Image" id=1]
data = { data = {
"data": PoolByteArray( 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ),
"format": "LumAlpha8", "format": "LumAlpha8",
@ -32,7 +32,7 @@ data = {
[sub_resource type="ImageTexture" id=2] [sub_resource type="ImageTexture" id=2]
flags = 4 flags = 4
flags = 4 flags = 4
image = SubResource( 3 ) image = SubResource( 1 )
size = Vector2( 16, 16 ) size = Vector2( 16, 16 )
[node name="Control" type="MarginContainer"] [node name="Control" type="MarginContainer"]
@ -60,6 +60,7 @@ cell_editor_classes = [ ExtResource( 15 ), ExtResource( 13 ), ExtResource( 11 ),
path_folder_path = NodePath("HeaderContentSplit/VBoxContainer/HBoxContainer/HBoxContainer/Path") path_folder_path = NodePath("HeaderContentSplit/VBoxContainer/HBoxContainer/HBoxContainer/Path")
path_recent_paths = NodePath("HeaderContentSplit/VBoxContainer/HBoxContainer/HBoxContainer2/RecentPaths") path_recent_paths = NodePath("HeaderContentSplit/VBoxContainer/HBoxContainer/HBoxContainer2/RecentPaths")
path_table_root = NodePath("HeaderContentSplit/MarginContainer/FooterContentSplit/Panel/Scroll/MarginContainer/TableGrid") path_table_root = NodePath("HeaderContentSplit/MarginContainer/FooterContentSplit/Panel/Scroll/MarginContainer/TableGrid")
path_table_root_scroll_container = NodePath("HeaderContentSplit/MarginContainer/FooterContentSplit/Panel/Scroll")
path_property_editors = NodePath("HeaderContentSplit/MarginContainer/FooterContentSplit/Footer/PropertyEditors") path_property_editors = NodePath("HeaderContentSplit/MarginContainer/FooterContentSplit/Footer/PropertyEditors")
path_columns = NodePath("HeaderContentSplit/VBoxContainer/Columns/Columns") path_columns = NodePath("HeaderContentSplit/VBoxContainer/Columns/Columns")
path_hide_columns_button = NodePath("HeaderContentSplit/VBoxContainer/HBoxContainer2/VisibleCols") path_hide_columns_button = NodePath("HeaderContentSplit/VBoxContainer/HBoxContainer2/VisibleCols")
@ -250,9 +251,9 @@ margin_bottom = 50.0
[node name="Pages" type="HBoxContainer" parent="HeaderContentSplit/VBoxContainer"] [node name="Pages" type="HBoxContainer" parent="HeaderContentSplit/VBoxContainer"]
visible = false visible = false
margin_top = 50.0 margin_top = 52.0
margin_right = 1018.0 margin_right = 1018.0
margin_bottom = 74.0 margin_bottom = 76.0
script = ExtResource( 17 ) script = ExtResource( 17 )
path_editor_view_root = NodePath("../../..") path_editor_view_root = NodePath("../../..")
@ -276,7 +277,7 @@ text = "Rows per page:"
[node name="LineEdit" type="SpinBox" parent="HeaderContentSplit/VBoxContainer/Pages"] [node name="LineEdit" type="SpinBox" parent="HeaderContentSplit/VBoxContainer/Pages"]
margin_left = 142.0 margin_left = 142.0
margin_right = 200.0 margin_right = 216.0
margin_bottom = 24.0 margin_bottom = 24.0
min_value = 2.0 min_value = 2.0
max_value = 300.0 max_value = 300.0