Skip to content
This repository has been archived by the owner on Dec 11, 2019. It is now read-only.

Show top panel in fullscreen on mouse over #4193

Merged
merged 6 commits into from
Sep 26, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions js/components/frame.js
Original file line number Diff line number Diff line change
Expand Up @@ -901,8 +901,6 @@ class Frame extends ImmutableComponent {
this.webview.focus()
}
windowActions.setNavigated(e.url, this.props.frameKey, false)
// force temporary url display for tabnapping protection
windowActions.setMouseInTitlebar(true)

// After navigating to the URL, set correct frame title
let webContents = this.webview.getWebContents()
Expand Down
10 changes: 8 additions & 2 deletions js/components/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -519,7 +519,7 @@ class Main extends ImmutableComponent {
}

const height = navigator.getBoundingClientRect().bottom
if (this.pageY < height && this.props.windowState.getIn(['ui', 'mouseInTitlebar']) !== true) {
if (this.pageY <= height && this.props.windowState.getIn(['ui', 'mouseInTitlebar']) !== true) {
windowActions.setMouseInTitlebar(true)
} else if (this.pageY === undefined || this.pageY >= height && this.props.windowState.getIn(['ui', 'mouseInTitlebar']) !== false) {
windowActions.setMouseInTitlebar(false)
Expand Down Expand Up @@ -844,7 +844,13 @@ class Main extends ImmutableComponent {
return <div id='window'
className={cx({
isFullScreen: activeFrame && activeFrame.get('isFullScreen'),
frameless: customTitlebar.captionButtonsVisible
isWindowFullScreen: this.props.windowState.getIn(['ui', 'isFullScreen']),
frameless: customTitlebar.captionButtonsVisible,
visible: this.props.windowState.getIn(['ui', 'isFullScreen']) &&
(
(activeFrame && activeFrame.getIn(['navbar', 'urlbar', 'focused'])) ||
(this.props.windowState.getIn(['ui', 'mouseInTitlebar']))
)
})}
ref={(node) => { this.mainWindow = node }}
onMouseDown={this.onMouseDown}
Expand Down
5 changes: 5 additions & 0 deletions js/stores/windowStore.js
Original file line number Diff line number Diff line change
Expand Up @@ -345,6 +345,11 @@ const doAction = (action) => {
if (!(action.location === 'about:newtab' && !FrameStateUtil.getActiveFrame(windowState).get('canGoForward'))) {
updateNavBarInput(action.location, frameStatePath(key))
}

if (!windowState.getIn(['ui', 'isFullScreen'])) {
// force temporary url display for tabnapping protection
windowState = windowState.setIn(['ui', 'mouseInTitlebar'], true)
}
break
case WindowConstants.WINDOW_SET_NAVBAR_INPUT:
updateNavBarInput(action.location)
Expand Down
27 changes: 23 additions & 4 deletions less/window.less
Original file line number Diff line number Diff line change
Expand Up @@ -34,16 +34,35 @@ html,
width: 100%;

&.isFullScreen {
.top, .downloadsBar, .hrefPreview {
display: none;
}
}
.top, .downloadsBar, .hrefPreview {
display: none;
}
}
}

#windowContainer {
width: 100%;
height: 100%;
position: absolute;

.platform--linux, .platform--win32 {
#window {
&.isWindowFullScreen {
.top, .downloadsBar, .hrefPreview {
transition: all 0.4s ease-out;
opacity: 0;
max-height: 0px;
}
}

&.visible {
.top, .downloadsBar, .hrefPreview {
max-height: 500px;
opacity: 1;
}
}
}
}
}

.top {
Expand Down