Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Where does the value of
360
come from? I notice that inIndicator.vala
,get_widget ()
returns a box with awidth_request
of300
.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah right it might be better to change it there then.
360 is usually the width of the NotificationEntries that are the ListBoxRows representing Notifications but I can't say for sure that's always this way. Might this be problematic?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, changing it to
360
in Indicator.vala has the same effect without adding another line. I am not absolutely sure what limits the width of NotificationEntry - I'll do some testing.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like its the
width_chars
andmax_width_chars
properties of the title label.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
After further investigation, it seems that the elementary notifications server produces a bubble with width
332
(hard coded). So if you want the notification list to match the bubbles, that value should be used inIndicator.vala
. Maybe in future that value could be parameterized as a setting so both projects could be easily kept in sync (?)There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah we use character width here instead of width request so that if the text size changes you don't see fewer characters for large fonts.
It might be worth seeing if we can set a min-width with CSS in characters? Otherwise I wonder if we could pack an invisible fake notification maybe. Not super clean but would make sure it's the same width all the time
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The NotificationEntries are actually wider than that (they still look about the same my guess would be that's because of some CSS stuff which i don't really know much about), we probably would have to reduce the
width_char
then to keep a constant width which doesn't seem optimal.I would still plead for increasing the
width_request
in Indicator.vala to 360 as this keeps the width constant most/all of the time (also with bigger text sizes), is very easy and not a very big change as the "default" size is hardcoded already anyway (at 300). The only problem I can see here is that the notifications indicator might take up more screen space which IMHO doesn't do to much harm at 60 units. Another problem is that it's still hardcoded so it might not work anymore when in the future the default sizes of NotificationEntries change.