|
|
Chromium Code Reviews
Description[Mac] Reverse tabs in RTL mode
Also exposes the kExperimentalMacRTL flag publicly so that it can be
enabled in tests.
BUG=648559
Committed: https://crrev.com/052b36d8d021d293f9cbd8c32b1ddee5c99ade8d
Cr-Commit-Position: refs/heads/master@{#431004}
Patch Set 1 #
Total comments: 3
Patch Set 2 : Leave Y mask on icon #Patch Set 3 : Format #Patch Set 4 : Update icon mask and add force RTL direction #
Messages
Total messages: 29 (13 generated)
lgrey@chromium.org changed reviewers: + ellyjones@chromium.org
Elly PTAL :)
lgtm :) Nice work!
Thanks, Elly! Nico PTAL for owners
thakis@chromium.org changed reviewers: + thakis@chromium.org
lgtm, thanks. If I read this right, this makes it so that the 0th tab is now on the right, the first to the left of the 0th, etc, yes? So cmd-1 will select the rightmost tab, cmd-2 the second-from-right, and cmd-9 the leftmost? If so, is that what we want? (What does RTL chrome on Windows do, what does Safari do?) https://codereview.chromium.org/2488833002/diff/1/chrome/browser/ui/cocoa/tab... File chrome/browser/ui/cocoa/tabs/tab_controller.mm (right): https://codereview.chromium.org/2488833002/diff/1/chrome/browser/ui/cocoa/tab... chrome/browser/ui/cocoa/tabs/tab_controller.mm:124: ? NSViewMaxXMargin | NSViewMinYMargin why is the y autoresizing mask different in rtl mode?
On 2016/11/09 15:27:35, Nico wrote: > lgtm, thanks. > > If I read this right, this makes it so that the 0th tab is now on the right, the > first to the left of the 0th, etc, yes? So cmd-1 will select the rightmost tab, > cmd-2 the second-from-right, and cmd-9 the leftmost? If so, is that what we > want? (What does RTL chrome on Windows do, what does Safari do?) Nope, that part is already done by Elly a while back (https://codereview.chromium.org/2313723004/). FWIW this is how Safari and Linux Chrome behave (not sure the best way to check Windows). This reverses the layout of individual tabs to put the icon on the right and the alert/close buttons on the left, hence the autoresizing mask change you asked about.
But why does autosizing in Y change? LTR should only affect X? On Wed, Nov 9, 2016 at 10:36 AM, <lgrey@chromium.org> wrote: > On 2016/11/09 15:27:35, Nico wrote: > > lgtm, thanks. > > > > If I read this right, this makes it so that the 0th tab is now on the > right, > the > > first to the left of the 0th, etc, yes? So cmd-1 will select the > rightmost > tab, > > cmd-2 the second-from-right, and cmd-9 the leftmost? If so, is that what > we > > want? (What does RTL chrome on Windows do, what does Safari do?) > > Nope, that part is already done by Elly a while back > (https://codereview.chromium.org/2313723004/). FWIW this is how Safari > and Linux > Chrome behave (not sure the best way to check Windows). > > This reverses the layout of individual tabs to put the icon on the right > and the > alert/close buttons on the left, hence the autoresizing mask change you > asked > about. > > > https://codereview.chromium.org/2488833002/ > -- You received this message because you are subscribed to the Google Groups "Chromium-reviews" group. To unsubscribe from this group and stop receiving emails from it, send an email to chromium-reviews+unsubscribe@chromium.org.
https://codereview.chromium.org/2488833002/diff/1/chrome/browser/ui/cocoa/tab... File chrome/browser/ui/cocoa/tabs/tab_controller.mm (right): https://codereview.chromium.org/2488833002/diff/1/chrome/browser/ui/cocoa/tab... chrome/browser/ui/cocoa/tabs/tab_controller.mm:124: ? NSViewMaxXMargin | NSViewMinYMargin On 2016/11/09 15:27:34, Nico wrote: > why is the y autoresizing mask different in rtl mode? It doesn't. I decided (kind of arbitrarily), to flip the entire masks on the leftmost elements (see line 104) vs. just flipping the X. To be honest, I'm not really sure why the Y is necessary: do tabs ever change height? Happy to change it to keep the Y mask on the icon only if you think that's better
https://codereview.chromium.org/2488833002/diff/1/chrome/browser/ui/cocoa/tab... File chrome/browser/ui/cocoa/tabs/tab_controller.mm (right): https://codereview.chromium.org/2488833002/diff/1/chrome/browser/ui/cocoa/tab... chrome/browser/ui/cocoa/tabs/tab_controller.mm:124: ? NSViewMaxXMargin | NSViewMinYMargin On 2016/11/09 15:48:51, lgrey wrote: > On 2016/11/09 15:27:34, Nico wrote: > > why is the y autoresizing mask different in rtl mode? > > It doesn't. I decided (kind of arbitrarily), to flip the entire masks on the > leftmost elements (see line 104) vs. just flipping the X. To be honest, I'm not > really sure why the Y is necessary: do tabs ever change height? No. > Happy to change it to keep the Y mask on the icon only if you think that's > better I don't understand why the change was made (and if it's made, why it's only made in LTR mode). If there's a good reason for that change, I'm fine with keeping it, I'd just like to understand why it was done.
On 2016/11/09 15:52:29, Nico wrote: > https://codereview.chromium.org/2488833002/diff/1/chrome/browser/ui/cocoa/tab... > File chrome/browser/ui/cocoa/tabs/tab_controller.mm (right): > > https://codereview.chromium.org/2488833002/diff/1/chrome/browser/ui/cocoa/tab... > chrome/browser/ui/cocoa/tabs/tab_controller.mm:124: ? NSViewMaxXMargin | > NSViewMinYMargin > On 2016/11/09 15:48:51, lgrey wrote: > > On 2016/11/09 15:27:34, Nico wrote: > > > why is the y autoresizing mask different in rtl mode? > > > > It doesn't. I decided (kind of arbitrarily), to flip the entire masks on the > > leftmost elements (see line 104) vs. just flipping the X. To be honest, I'm > not > > really sure why the Y is necessary: do tabs ever change height? > > No. > > > Happy to change it to keep the Y mask on the icon only if you think that's > > better > > I don't understand why the change was made (and if it's made, why it's only made > in LTR mode). If there's a good reason for that change, I'm fine with keeping > it, I'd just like to understand why it was done. Done. To summarize offline discussion for posterity, the Y mask is necessary because the icon size varies and the close button is static
The CQ bit was checked by lgrey@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
I meant it the other way: Favicons are always 16px, while the button might be some other size. On Wed, Nov 9, 2016 at 11:17 AM, <lgrey@chromium.org> wrote: > On 2016/11/09 15:52:29, Nico wrote: > > > https://codereview.chromium.org/2488833002/diff/1/chrome/ > browser/ui/cocoa/tabs/tab_controller.mm > > File chrome/browser/ui/cocoa/tabs/tab_controller.mm (right): > > > > > https://codereview.chromium.org/2488833002/diff/1/chrome/ > browser/ui/cocoa/tabs/tab_controller.mm#newcode124 > > chrome/browser/ui/cocoa/tabs/tab_controller.mm:124: ? NSViewMaxXMargin | > > NSViewMinYMargin > > On 2016/11/09 15:48:51, lgrey wrote: > > > On 2016/11/09 15:27:34, Nico wrote: > > > > why is the y autoresizing mask different in rtl mode? > > > > > > It doesn't. I decided (kind of arbitrarily), to flip the entire masks > on the > > > leftmost elements (see line 104) vs. just flipping the X. To be > honest, I'm > > not > > > really sure why the Y is necessary: do tabs ever change height? > > > > No. > > > > > Happy to change it to keep the Y mask on the icon only if you think > that's > > > better > > > > I don't understand why the change was made (and if it's made, why it's > only > made > > in LTR mode). If there's a good reason for that change, I'm fine with > keeping > > it, I'd just like to understand why it was done. > > Done. > > To summarize offline discussion for posterity, the Y mask is necessary > because > the icon size varies and the close button is static > > https://codereview.chromium.org/2488833002/ > -- You received this message because you are subscribed to the Google Groups "Chromium-reviews" group. To unsubscribe from this group and stop receiving emails from it, send an email to chromium-reviews+unsubscribe@chromium.org.
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: mac_chromium_rel_ng on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_rel_...)
The CQ bit was checked by lgrey@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
PTAL again, fixed the autoresizing mask in one more place and changed default locale for the RTL test
lgtm
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
The CQ bit was checked by lgrey@chromium.org
The patchset sent to the CQ was uploaded after l-g-t-m from ellyjones@chromium.org Link to the patchset: https://codereview.chromium.org/2488833002/#ps60001 (title: "Update icon mask and add force RTL direction")
Thanks, Nico!
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
Message was sent while issue was closed.
Committed patchset #4 (id:60001)
Message was sent while issue was closed.
Description was changed from ========== [Mac] Reverse tabs in RTL mode Also exposes the kExperimentalMacRTL flag publicly so that it can be enabled in tests. BUG=648559 ========== to ========== [Mac] Reverse tabs in RTL mode Also exposes the kExperimentalMacRTL flag publicly so that it can be enabled in tests. BUG=648559 Committed: https://crrev.com/052b36d8d021d293f9cbd8c32b1ddee5c99ade8d Cr-Commit-Position: refs/heads/master@{#431004} ==========
Message was sent while issue was closed.
Patchset 4 (id:??) landed as https://crrev.com/052b36d8d021d293f9cbd8c32b1ddee5c99ade8d Cr-Commit-Position: refs/heads/master@{#431004} |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
