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

TouchMenu: keep hamburger menu on the right #2679

Merged
merged 1 commit into from
Mar 30, 2017

Conversation

Frenzie
Copy link
Member

@Frenzie Frenzie commented Mar 26, 2017

This time without obvious issues. Also see #2572.

screenshot_2017-03-26_16-12-09
screenshot_2017-03-26_16-12-14
screenshot_2017-03-26_16-12-22
screenshot_2017-03-26_16-12-28

@Frenzie Frenzie force-pushed the hamburger_right branch 2 times, most recently from d1cbbb0 to 254f21d Compare March 26, 2017 14:18
local current_icon = i == k - 1 or i == k
self.icon_seps[i].style = current_icon and "solid" or "none"
local current_icon = (i == k - 1 or i == k) and k ~= #self.icons
local last_icon = i == k and k == #self.icons
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nitpick to reduce comparisons:

local current_icon, last_icon
if k == #self.icons then
    current_icon = false
    last_icon = i == k
else
    current_icon = i == k - 1 or i == k
    last_icon = false
end

s = icon_sep_width + stretch_width + _start_seg, e = icon_sep_width + stretch_width + _end_seg
}
}
self.icon_seps[i].style = "solid"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

self.icon_seps[i] can be replaced by sep here? sep.style = current_icon and "solid" or "none" can also be moved into the else block after this if block.

@Frenzie
Copy link
Member Author

Frenzie commented Mar 29, 2017

@houqp Btw, I updated the PR a couple of days ago already. :-) I don't know if GitHub notifies about force pushing.

@Frenzie Frenzie added the UX label Mar 30, 2017
@houqp houqp merged commit cee3603 into koreader:master Mar 30, 2017
@Frenzie Frenzie deleted the hamburger_right branch October 1, 2017 15:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants