GNOME Bugzilla – Bug 746538
online-accounts: Prevent the attention-needed icon from getting hidden
Last modified: 2015-04-13 13:09:41 UTC
See the attached screenshot and patch.
Created attachment 299962 [details] Screenshot of hidden attention-needed icons
Created attachment 299963 [details] [review] online-accounts: Prevent the attention-needed icon from getting hidden This increases the width to 278 from the automatically allocated 259.
Created attachment 299964 [details] Screenshot of a wider list without hidden icons
Review of attachment 299963 [details] [review]: That seems very hackish. We should rework the layout so that the list is never clipped to the left.
From #control-center on GIMPNet: 12:43 <hadess> rishi, pretty horrible hack 12:44 <hadess> rishi, setting the scrolled window it's in to not have a horizontal scrollbar should allow it to now get clipped 12:44 <hadess> rishi, then make the account identifier ellipsise 12:49 <rishi> hadess: That is already the case since commit f86d8eb26cc922fabd6765f3ad2481b9f0218298 12:49 <rishi> Maybe we shouldn't be setting the width_request on the tree view? 12:50 <hadess> that might be enough Removing the GtkTreeView's width-request and setting its hexpand to TRUE will work for this bug, but it creates other problems. When there are no accounts, then the GtkTreeView shrinks. You can then see it become wider as new accounts are added or when the attention-needed icon shows up. So we can't really let it change its width with the current design. So, maybe, it will be less horrible if we increase the width-request of the GtkTreeView itself instead of adding a new width-request to the parent GtkBox? Or we can play with the width-chars property of the GtkCellRendererText ...
Created attachment 300352 [details] [review] online-accounts: Prevent the attention-needed icon from getting hidden
(In reply to Debarshi Ray from comment #6) > Created attachment 300352 [details] [review] [review] > online-accounts: Prevent the attention-needed icon from getting hidden Isn't this the same hack in a different place?
(In reply to Bastien Nocera from comment #7) > (In reply to Debarshi Ray from comment #6) > > Created attachment 300352 [details] [review] [review] [review] > > online-accounts: Prevent the attention-needed icon from getting hidden > > Isn't this the same hack in a different place? Yes, it is. I realized that we were already using width-request in some other place so I just decided to use it instead of adding another one. For reasons mentioned in comment 5 , I could not get anything else to work. Maybe you have a better idea.
Created attachment 301292 [details] [review] online-accounts: Prevent the attention-needed icon from getting hidden By making sure that the label inside each of the list items gets only whatever space is left by the left and right-side icons.
Created attachment 301293 [details] [review] online-accounts: Prevent the attention-needed icon from getting hidden By making sure that the label inside each of the list items gets only whatever space is left by the left and right-side icons.
This solves the original problem. We might very well decide that the list isn't wide enough though...
Review of attachment 301293 [details] [review]: ::: panels/online-accounts/cc-online-accounts-panel.c @@ +305,1 @@ NULL); Nice. That removes one hard-coded value. Actually, that width-chars was causing some jumping when you added the first account. How about we do this, and bump the width-request of the tree view? We can't remove the width-request for reasons mentioned in comment 5 , and increasing the width-request will address the narrowness.
(In reply to Debarshi Ray from comment #12) > Review of attachment 301293 [details] [review] [review]: > > ::: panels/online-accounts/cc-online-accounts-panel.c > @@ +305,1 @@ > NULL); > > Nice. That removes one hard-coded value. Actually, that width-chars was > causing some jumping when you added the first account. > > How about we do this, and bump the width-request of the tree view? Sure, but as I said, do it in a separate commit, because it ultimately solves a separate problem, right? > We can't remove the width-request for reasons mentioned in comment 5 , and > increasing the width-request will address the narrowness. Sure.
Created attachment 301456 [details] [review] online-accounts: Widen the accounts list