Skip to content

Commit

Permalink
honor review
Browse files Browse the repository at this point in the history
  • Loading branch information
zwim committed Mar 6, 2024
1 parent 754d5f3 commit 86968b2
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 13 deletions.
19 changes: 9 additions & 10 deletions frontend/apps/filemanager/filemanagermenu.lua
Original file line number Diff line number Diff line change
Expand Up @@ -624,6 +624,15 @@ To:
end,
})
end
table.insert(self.menu_items.developer_options.sub_item_table, {
text = _("Anti-alias rounded corners in UI"),
checked_func = function()
return G_reader_settings:nilOrTrue("anti_alias_ui")
end,
callback = function()
G_reader_settings:flipNilOrTrue("anti_alias_ui")
end,
})
--- @note: Currently, only Kobo implements this quirk
if Device:hasEinkScreen() and Device:isKobo() then
table.insert(self.menu_items.developer_options.sub_item_table, {
Expand Down Expand Up @@ -686,16 +695,6 @@ To:
UIManager:askForRestart()
end,
})
table.insert(self.menu_items.developer_options.sub_item_table, {
text = _("Anti-alias UI elements"),
checked_func = function()
return G_reader_settings:readSetting("anti_alias_ui", 1) ~= 0
end,
callback = function()
local old_val = G_reader_settings:readSetting("anti_alias_ui", 1)
G_reader_settings:saveSetting("anti_alias_ui", 1 - old_val)
end,
})
table.insert(self.menu_items.developer_options.sub_item_table, {
text = _("UI layout mirroring and text direction"),
sub_item_table = {
Expand Down
4 changes: 1 addition & 3 deletions frontend/ui/widget/container/framecontainer.lua
Original file line number Diff line number Diff line change
Expand Up @@ -135,9 +135,7 @@ function FrameContainer:paintTo(bb, x, y)
self.inner_bordersize, self.color, self.radius)
end
if self.bordersize > 0 then
local anti_alias = G_reader_settings:readSetting("anti_alias_ui", 1);
require("logger").dbg("anti_alias_ui:", type(anti_alias), anti_alias);

local anti_alias = G_reader_settings:nilOrTrue("anti_alias_ui")
bb:paintBorder(x + self.margin, y + self.margin,
container_width - self.margin * 2,
container_height - self.margin * 2,
Expand Down

0 comments on commit 86968b2

Please sign in to comment.