Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Tuba opens without Notifications/Conversations #575

Closed
IBBoard opened this issue Oct 1, 2023 · 1 comment · Fixed by #580
Closed

[Bug]: Tuba opens without Notifications/Conversations #575

IBBoard opened this issue Oct 1, 2023 · 1 comment · Fixed by #580
Labels
bug Something isn't working

Comments

@IBBoard
Copy link

IBBoard commented Oct 1, 2023

Describe the bug

I have Tuba set to open at about 560px wide - it's wide enough to read a post comfortably, it isn't so wide that it wastes space with the side panel that I barely ever use, and it's not so narrow that it moves the buttons to the bottom.

Since switching to v0.5, when I open Tuba then I only get "Home" in the header but no buttons at the bottom. If I resize the window then the buttons come back.

It feels like something is hitting "don't show the top buttons" conditions before the "show the bottom buttons" condition is also true. But as it's not happening when I grow and then shrink it back to the same size then it's a bid of an odd corner case.

Steps To Reproduce

  1. Open Tuba. Resize to 560px wide. Note the Home/Notifications/Conversations buttons at the top
  2. Close Tuba
  3. Re-open Tuba
  4. Look at top and bottom of window
  • Expected: Three buttons at top, nothing at bottom
  • Actual: title bar just contains "Home" as a text label, nothing at the bottom in place of the buttons

Logs and/or Screenshots

Screenshot after loading (reduced height)

Screenshot after resizing to >700px and reducing back

Instance Backend

Mastodon

Operating System

openSuse Tumbleweed

Package

Compiled manually

Troubleshooting information

os: openSUSE Tumbleweed (null)
prefix: /usr
flatpak: false
version: IBBoard/customisations-6acf7e2 (development)
gtk: 4.12.2 (4.12.1)
libadwaita: 1.4.0 (1.4.0)
libsoup: 3.4.3 (3.4.3)
libgtksourceview: 5.10.0 (5.10.0)

Additional Context

Custom changes:

  • Make avatars square, as nature intended
  • Fix an overly dark hover colour on custom theme
  • Don't single click
  • Only show 0/1/1+ because counts aren't important above that
diff --git a/data/style.css b/data/style.css
index 9c16e50..efe34a3 100644
--- a/data/style.css
+++ b/data/style.css
@@ -255,16 +255,26 @@ flowboxchild {
 }
 
 .ttl-status-avatar-border {
-	border: 3px solid @popover_bg_color;
-	border-radius: 100%;
+	outline: 3px solid @popover_bg_color;
+	outline-offset: 0;
+	border-radius: 5px;
 	background-color: @popover_bg_color;
 }
 
+.ttl-post > box > box > overlay > button {
+	border-radius: 5px;
+}
+
 .card-spacing {
 	margin-top: 6px;
 	margin-bottom: 6px;
 }
 
+.ttl-post:hover {
+	background-color: #cecece;
+	background-image: none;
+}
+
 .ttl-post.direct {
 	background-color: alpha(@warning_bg_color, .1);
 }
diff --git a/src/Views/ContentBase.vala b/src/Views/ContentBase.vala
index b92fe30..c8a9226 100644
--- a/src/Views/ContentBase.vala
+++ b/src/Views/ContentBase.vala
@@ -37,6 +37,7 @@ public class Tuba.Views.ContentBase : Views.Base {
 			content.row_activated.connect (on_content_item_activated);
 			content.bind_model (model, on_create_model_widget);
 		#endif
+		content.activate_on_single_click = false;
 		content_box.child = content;
 
 		scrolled.vadjustment.value_changed.connect (on_scrolled_vadjustment_value_change);
diff --git a/src/Widgets/StatusActionButton.vala b/src/Widgets/StatusActionButton.vala
index 5eac798..628f58f 100644
--- a/src/Widgets/StatusActionButton.vala
+++ b/src/Widgets/StatusActionButton.vala
@@ -59,7 +59,12 @@ public class Tuba.StatusActionButton : Gtk.Button {
 			return;
 		}
 
-		content.label = Tuba.Units.shorten (new_value);
+		if (new_value == 1) {
+			content.label = "1";
+		}
+		else {
+			content.label = "1+";
+		}
 		content.margin_start = 12;
 		content.margin_end = 9;
 	}
@IBBoard IBBoard added the bug Something isn't working label Oct 1, 2023
@IBBoard
Copy link
Author

IBBoard commented Oct 4, 2023

That fixes it for me. Thanks 🙂

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant