Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Changelog

## Unreleased

### Fixes

- Fix User Feedback UI text cursor visibility in default theme ([#445](https://github.com/getsentry/sentry-godot/pull/445))

## 1.1.1

### Fixes
Expand Down
4 changes: 2 additions & 2 deletions project/addons/sentry/user_feedback/sentry_theme.tres
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ LineEdit/colors/font_placeholder_color = Color(0.44313726, 0.3882353, 0.49411765
LineEdit/colors/font_selected_color = Color(0.24313726, 0.20392157, 0.27450982, 1)
LineEdit/colors/font_uneditable_color = Color(0, 0, 0, 0.65)
LineEdit/colors/selection_color = Color(0.39607844, 0.34901962, 0.77254903, 0.4)
LineEdit/constants/caret_width = 1
LineEdit/constants/caret_width = 2
LineEdit/constants/minimum_character_width = 4
LineEdit/constants/outline_size = 0
LineEdit/styles/focus = SubResource("StyleBoxFlat_pmhvd")
Expand All @@ -275,7 +275,7 @@ TextEdit/colors/font_placeholder_color = Color(0.44313726, 0.3882353, 0.49411765
TextEdit/colors/font_readonly_color = Color(0, 0, 0, 0.65)
TextEdit/colors/font_selected_color = Color(0.24313726, 0.20392157, 0.27450982, 1)
TextEdit/colors/selection_color = Color(0.39607844, 0.34901962, 0.77254903, 0.4)
TextEdit/constants/caret_width = 1
TextEdit/constants/caret_width = 2
TextEdit/constants/line_spacing = 8
TextEdit/constants/outline_size = 0
TextEdit/styles/focus = SubResource("StyleBoxFlat_pmhvd")
Expand Down
3 changes: 3 additions & 0 deletions project/addons/sentry/user_feedback/user_feedback_form.tscn
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ size_flags_vertical = 3
placeholder_text = "Tell us about your issue"
wrap_mode = 1
tab_input_mode = false
caret_blink = true

[node name="NameSection" type="VBoxContainer" parent="MarginContainer/VBoxContainer"]
unique_name_in_owner = true
Expand All @@ -77,6 +78,7 @@ unique_name_in_owner = true
layout_mode = 2
size_flags_horizontal = 3
placeholder_text = "Your name (optional)"
caret_blink = true

[node name="EmailSection" type="VBoxContainer" parent="MarginContainer/VBoxContainer"]
unique_name_in_owner = true
Expand All @@ -91,6 +93,7 @@ unique_name_in_owner = true
layout_mode = 2
size_flags_horizontal = 3
placeholder_text = "Contact email (optional)"
caret_blink = true

[node name="Spacer3" type="Control" parent="MarginContainer/VBoxContainer"]
custom_minimum_size = Vector2(0, 6)
Expand Down
50 changes: 25 additions & 25 deletions project/addons/sentry/user_feedback/user_feedback_gui.gd
Original file line number Diff line number Diff line change
Expand Up @@ -100,10 +100,10 @@ func _resize_children() -> void:
var new_sz := Vector2(
minf(sz.x, maximum_form_size.x * scale_xy),
minf(sz.y - top_offset * scale_xy, maximum_form_size.y * scale_xy))
new_sz = new_sz.floor()
new_sz = new_sz.ceil()

var ofs: Vector2 = ((size - new_sz) / 2.0).floor()
ofs.y = floorf(top_offset * scale_xy)
var ofs: Vector2 = ((size - new_sz) / 2.0).ceil()
ofs.y = ceilf(top_offset * scale_xy)

# Override size constraints when expand & fill flags are set to use all available space.
if c.size_flags_vertical == SIZE_EXPAND_FILL:
Expand Down Expand Up @@ -134,8 +134,8 @@ func _rescale_theme(scale_factor: float) -> void:
var th: Theme = _original_theme.duplicate()

var font_size: int = th.default_font_size
th.default_font_size = floori(font_size * scale_factor)
th.set_font_size("font_size", "HeaderMedium", floori(font_size * 1.3 * scale_factor))
th.default_font_size = ceili(font_size * scale_factor)
th.set_font_size("font_size", "HeaderMedium", ceili(font_size * 1.3 * scale_factor))

# Resize stylebox items
for theme_type in th.get_stylebox_type_list():
Expand All @@ -148,7 +148,7 @@ func _rescale_theme(scale_factor: float) -> void:
for theme_type in th.get_constant_type_list():
for constant_name in th.get_constant_list(theme_type):
var c: int = th.get_constant(constant_name, theme_type)
c = floori(c * scale_factor)
c = ceili(c * scale_factor)
th.set_constant(constant_name, theme_type, c)

theme = th
Expand All @@ -158,25 +158,25 @@ func _scale_stylebox(sb: StyleBox, scale_factor: float) -> StyleBox:
if sb is StyleBoxFlat:
var new_sb: StyleBoxFlat = sb.duplicate()

new_sb.content_margin_bottom = floorf(new_sb.content_margin_bottom * scale_factor)
new_sb.content_margin_right = floorf(new_sb.content_margin_right * scale_factor)
new_sb.content_margin_left = floorf(new_sb.content_margin_left * scale_factor)
new_sb.content_margin_top = floorf(new_sb.content_margin_top * scale_factor)

new_sb.border_width_bottom = floorf(new_sb.border_width_bottom * scale_factor)
new_sb.border_width_top = floorf(new_sb.border_width_top * scale_factor)
new_sb.border_width_left = floorf(new_sb.border_width_left * scale_factor)
new_sb.border_width_right = floorf(new_sb.border_width_right * scale_factor)

new_sb.corner_radius_bottom_left = floorf(new_sb.corner_radius_bottom_left * scale_factor)
new_sb.corner_radius_bottom_right = floorf(new_sb.corner_radius_bottom_right * scale_factor)
new_sb.corner_radius_top_left = floorf(new_sb.corner_radius_top_left * scale_factor)
new_sb.corner_radius_top_right = floorf(new_sb.corner_radius_top_right * scale_factor)

new_sb.expand_margin_bottom = floorf(new_sb.expand_margin_bottom * scale_factor)
new_sb.expand_margin_left = floorf(new_sb.expand_margin_left * scale_factor)
new_sb.expand_margin_right = floorf(new_sb.expand_margin_right * scale_factor)
new_sb.expand_margin_top = floorf(new_sb.expand_margin_top * scale_factor)
new_sb.content_margin_bottom = ceilf(new_sb.content_margin_bottom * scale_factor)
new_sb.content_margin_right = ceilf(new_sb.content_margin_right * scale_factor)
new_sb.content_margin_left = ceilf(new_sb.content_margin_left * scale_factor)
new_sb.content_margin_top = ceilf(new_sb.content_margin_top * scale_factor)

new_sb.border_width_bottom = ceilf(new_sb.border_width_bottom * scale_factor)
new_sb.border_width_top = ceilf(new_sb.border_width_top * scale_factor)
new_sb.border_width_left = ceilf(new_sb.border_width_left * scale_factor)
new_sb.border_width_right = ceilf(new_sb.border_width_right * scale_factor)

new_sb.corner_radius_bottom_left = ceilf(new_sb.corner_radius_bottom_left * scale_factor)
new_sb.corner_radius_bottom_right = ceilf(new_sb.corner_radius_bottom_right * scale_factor)
new_sb.corner_radius_top_left = ceilf(new_sb.corner_radius_top_left * scale_factor)
new_sb.corner_radius_top_right = ceilf(new_sb.corner_radius_top_right * scale_factor)

new_sb.expand_margin_bottom = ceilf(new_sb.expand_margin_bottom * scale_factor)
new_sb.expand_margin_left = ceilf(new_sb.expand_margin_left * scale_factor)
new_sb.expand_margin_right = ceilf(new_sb.expand_margin_right * scale_factor)
new_sb.expand_margin_top = ceilf(new_sb.expand_margin_top * scale_factor)

return new_sb
else:
Expand Down
1 change: 0 additions & 1 deletion project/addons/sentry/user_feedback/user_feedback_gui.tscn
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ color = Color(0, 0, 0, 0.22745098)
[node name="UserFeedbackForm" parent="." instance=ExtResource("1_t8jgq")]
unique_name_in_owner = true
layout_mode = 2
mouse_filter = 1

[node name="SubmitButton" parent="UserFeedbackForm/MarginContainer/VBoxContainer/Actions" index="1"]
theme_type_variation = &"ActionButton"
Expand Down
Loading