Skip to content

Commit

Permalink
Honor changes in KOReader TitleBar
Browse files Browse the repository at this point in the history
  • Loading branch information
zwim committed Jan 29, 2022
1 parent e462f19 commit 9894afe
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 4 deletions.
6 changes: 6 additions & 0 deletions ChangeLog
@@ -1,3 +1,9 @@
Version: 1.1.6
adapt to new TitleBar widget

Version: 1.1.5
fix bug in update check, when connection is firewalled

Version: 1.1.4
fix bug in update check
better formatting of significant places
Expand Down
1 change: 1 addition & 0 deletions Makefile
Expand Up @@ -17,6 +17,7 @@ zip: clean
rsync -a --cvs-exclude \
--exclude '*.editorconfig' \
--exclude '*.gitignore' \
--exclude '*.circleci' \
--exclude 'Makefile' \
--exclude 'LICENSE' \
--exclude 'README.md' \
Expand Down
4 changes: 2 additions & 2 deletions VERSION
@@ -1,2 +1,2 @@
Version: 1.1.4
Date: 20210928
Version: 1.1.6
Date: 20220129
Binary file added calculator.koplugin-1.1.5.zip
Binary file not shown.
Binary file added calculator.koplugin-1.1.6.zip
Binary file not shown.
8 changes: 6 additions & 2 deletions main.lua
Expand Up @@ -294,10 +294,14 @@ function Calculator:onCalculatorStart()

-- fill status line with spaces
local expand = -1 -- expand tabs with x spaces
self.input_dialog = self:generateInputDialog(self:expandTabs(self.status_line, 1), hint)
local old_height = self.input_dialog.title_bar:getHeight()
print("xxx", old_height, expand)
repeat
expand = expand + 1
self.input_dialog = self:generateInputDialog(self:expandTabs(self.status_line, expand), hint)
until (self.input_dialog.description_widget[1].lines_per_page > 1 or expand > 20)
print("xxx", old_height, expand )
until (expand > 50 or self.input_dialog.title_bar:getHeight() ~= old_height )

self.input_dialog = self:generateInputDialog(self:expandTabs(self.status_line, expand - 1), hint)

Expand Down Expand Up @@ -520,7 +524,7 @@ function Calculator:getLatestVersion(url, timeout, maxtime)
local socketutil = require("socketutil")

local sink = {}
socketutil:set_timeout(timeout or 10, maxtime or 30)
socketutil:set_timeout(timeout or 3, maxtime or 5)
local request = {
url = url,
method = "GET",
Expand Down

0 comments on commit 9894afe

Please sign in to comment.