Nuke toggling the header auto-hide by clicking on its border.

This commit is contained in:
Mayhem 2014-03-10 09:29:30 +01:00
parent e294721ad5
commit 3b183d7283
4 changed files with 9 additions and 25 deletions

View File

@ -1,3 +1,6 @@
- Clicking on the border of the Header will not toggle `Header auto-hide` anymore.
You can still change the setting in the Header menu → Header.
## 3.19.0 - *2014-02-22*
- Thread and post hiding changes:

View File

@ -159,26 +159,18 @@ a[href="javascript:;"] {
-webkit-transform: translateY(100%);
transform: translateY(100%);
}
#toggle-header-bar {
#header-bar-hitzone {
left: 0;
right: 0;
height: 10px;
position: absolute;
}
#header.top #toggle-header-bar {
cursor: n-resize;
#header.top #header-bar-hitzone {
bottom: -10px;
}
#header.bottom #toggle-header-bar {
cursor: s-resize;
#header.bottom #header-bar-hitzone {
top: -10px;
}
#header.top #header-bar.autohide #toggle-header-bar {
cursor: s-resize;
}
#header.bottom #header-bar.autohide #toggle-header-bar {
cursor: n-resize;
}
#header-bar a:not(.entry) {
text-decoration: none;
padding: 1px;

View File

@ -4,6 +4,6 @@
<span id="custom-board-list"></span>
<span id="full-board-list" hidden></span>
</span>
<div id="toggle-header-bar" title="Toggle the header auto-hiding."></div>
<div id="header-bar-hitzone"></div>
</div>
<div id="notifications"></div>

View File

@ -5,7 +5,7 @@ Header =
innerHTML: <%= importHTML('General/Header') %>
@bar = $ '#header-bar', headerEl
@toggle = $ '#toggle-header-bar', @bar
@toggle = $ '#header-bar-hitzone', @bar
@noticesRoot = $ '#notifications', headerEl
@menu = new UI.Menu 'header'
@ -15,7 +15,6 @@ Header =
href: 'javascript:;'
$.on menuButton, 'click', @menuToggle
@addShortcut menuButton, 0
$.on @toggle, 'mousedown', @toggleBarVisibility
$.on window, 'load hashchange', Header.hashScroll
$.on d, 'CreateNotification', @createNotification
@ -178,22 +177,12 @@ Header =
setBarVisibility: (hide) ->
Header.headerToggler.checked = hide
$.event 'CloseMenu'
(if hide then $.addClass else $.rmClass) Header.bar, 'autohide'
toggleBarVisibility: (e) ->
return if e.type is 'mousedown' and e.button isnt 0 # not LMB
hide = if @nodeName is 'INPUT'
@checked
else
!$.hasClass Header.bar, 'autohide'
hide = @checked
Conf['Header auto-hide'] = hide
$.set 'Header auto-hide', hide
Header.setBarVisibility hide
message = if hide
'The header bar will automatically hide itself.'
else
'The header bar will remain visible.'
new Notice 'info', message, 2
setHideBarOnScroll: (hide) ->
Header.scrollHeaderToggler.checked = hide