bigger scrollbars

This commit is contained in:
jean-emmanuel 2015-10-27 09:59:38 +01:00
parent 0fe5b4dd7c
commit 80e42b0721
3 changed files with 16 additions and 16 deletions

File diff suppressed because one or more lines are too long

View file

@ -56,17 +56,10 @@ init = function(session,callback) {
// get current webFrame
var webFrame = require('web-frame');
// reset zoom
$(document).on('keydown.resetzoom', function(e){
if (e.keyCode==96||e.keyCode==48) webFrame.setZoomFactor(1)
})
// horizontal scrolling & zoom with mousewheel
// if shift is pressed (native), or if there is no vertical scrollbar,
// or if mouse is on h-scrollbar
var scrollbarHeight = 10
var scrollbarHeight = 20
var contentPanels = $('.content')
$('.tab').on('mousewheel',function(e) {
// console.log(e)
@ -75,6 +68,7 @@ init = function(session,callback) {
var d = -e.originalEvent.deltaY/Math.abs(e.originalEvent.deltaY)/10,
s = d+webFrame.getZoomFactor()
webFrame.setZoomFactor(s);
scrollbarHeight = (s*20)
} else {
var h = $('#container').innerHeight()-scrollbarHeight-$(this).parents('.tab').length*5
@ -101,6 +95,12 @@ init = function(session,callback) {
}
})
// reset zoom
$(document).on('keydown.resetzoom', function(e){
if (e.keyCode==96||e.keyCode==48) webFrame.setZoomFactor(1)
scrollbarHeight = 20
})
// sidepanel
$('#container').append('\

View file

@ -66,8 +66,8 @@ a {
$scrollbar-margin:1rem;
::-webkit-scrollbar {
width: 10rem;
height:10rem;
width: 20rem;
height:20rem;
opacity:1;
}
@ -87,13 +87,10 @@ $scrollbar-margin:1rem;
::-webkit-scrollbar-thumb {
background:$bg-3d;
&:vertical {
border:$scrollbar-margin solid $color-border;
border-width: 0 $scrollbar-margin 0 $scrollbar-margin;
border-left:$scrollbar-margin solid $color-border;
}
&:horizontal {
border:$scrollbar-margin solid $color-border;
border-width: $scrollbar-margin 0 $scrollbar-margin 0;
border-top:$scrollbar-margin solid $color-border;
}
}
@ -734,6 +731,9 @@ form {
width:100%;
}
}
&::-webkit-scrollbar-thumb, &::-webkit-scrollbar-track-piece {
border: 1rem solid $color-bg;
}
}
}