mirror of
https://github.com/onionshare/onionshare.git
synced 2025-01-12 15:59:30 -05:00
resort to static height, to put the scrollbar in the right place
This commit is contained in:
parent
4c80591cc0
commit
9ff94d3ca4
@ -17,11 +17,10 @@ class Window(QWebView):
|
|||||||
def __init__(self, basename, webapp_port):
|
def __init__(self, basename, webapp_port):
|
||||||
QWebView.__init__(self)
|
QWebView.__init__(self)
|
||||||
self.setWindowTitle("{0} | OnionShare".format(basename))
|
self.setWindowTitle("{0} | OnionShare".format(basename))
|
||||||
self.resize(550, 350)
|
self.resize(580, 400)
|
||||||
self.setMinimumSize(550, 300)
|
self.setMinimumSize(580, 400)
|
||||||
self.setMaximumSize(550, 900)
|
self.setMaximumSize(580, 400)
|
||||||
self.load(QUrl("http://127.0.0.1:{0}".format(webapp_port)))
|
self.load(QUrl("http://127.0.0.1:{0}".format(webapp_port)))
|
||||||
self.frame = self.page().currentFrame()
|
|
||||||
|
|
||||||
def alert(msg, icon=QMessageBox.NoIcon):
|
def alert(msg, icon=QMessageBox.NoIcon):
|
||||||
dialog = QMessageBox()
|
dialog = QMessageBox()
|
||||||
|
@ -4,10 +4,6 @@ $(function(){
|
|||||||
function update($msg) {
|
function update($msg) {
|
||||||
var $line = $('<li>').append($msg);
|
var $line = $('<li>').append($msg);
|
||||||
$('#log').append($line);
|
$('#log').append($line);
|
||||||
|
|
||||||
// scroll to bottom
|
|
||||||
set_log_height();
|
|
||||||
$('#log').scrollTop($('#log').height());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function copy_to_clipboard() {
|
function copy_to_clipboard() {
|
||||||
@ -116,12 +112,4 @@ $(function(){
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
// make sure the log always has a height set, so it will have its own scrollbar
|
|
||||||
function set_log_height() {
|
|
||||||
var new_height = $(document).height() - 140; // header = 100, footer = 40
|
|
||||||
$('#log').css('height', new_height);
|
|
||||||
}
|
|
||||||
set_log_height();
|
|
||||||
$.resize(set_log_height);
|
|
||||||
});
|
});
|
||||||
|
@ -56,6 +56,7 @@ ul#log {
|
|||||||
margin: 0;
|
margin: 0;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
list-style: none;
|
list-style: none;
|
||||||
|
height: 258px;
|
||||||
overflow: auto;
|
overflow: auto;
|
||||||
word-wrap: break-word;
|
word-wrap: break-word;
|
||||||
font-family: arial;
|
font-family: arial;
|
||||||
|
Loading…
Reference in New Issue
Block a user