mirror of
https://github.com/koreader/koreader.git
synced 2025-08-10 00:52:38 +00:00
bug fix: read css file name instread of content in cre:setStyleSheet
This commit is contained in:
8
cre.cpp
8
cre.cpp
@@ -408,9 +408,13 @@ static int setDefaultInterlineSpace(lua_State *L) {
|
||||
|
||||
static int setStyleSheet(lua_State *L) {
|
||||
CreDocument *doc = (CreDocument*) luaL_checkudata(L, 1, "credocument");
|
||||
const char* style_sheet_data = luaL_checkstring(L, 2);
|
||||
const char* style_sheet = luaL_checkstring(L, 2);
|
||||
lString8 css;
|
||||
|
||||
if (LVLoadStylesheetFile(lString16(style_sheet), css)){
|
||||
doc->text_view->setStyleSheet(css);
|
||||
}
|
||||
|
||||
doc->text_view->setStyleSheet(lString8(style_sheet_data));
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user