From 1f4d264090784f4e5b20e69cacafaed1b56efe94 Mon Sep 17 00:00:00 2001 From: IgorTimofeev Date: Sun, 8 Oct 2023 22:20:04 +0300 Subject: [PATCH] =?UTF-8?q?=D0=9D=D0=A3,=20=D0=97=D0=9D=D0=90=D0=AF=20?= =?UTF-8?q?=D0=A4=D0=95=D0=94=D0=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Applications/App Market.app/Main.lua | 21 ++++++++++++++----- Applications/Finder.app/Main.lua | 10 ++++++++- .../Settings.app/Modules/0_Screen/Main.lua | 6 +++--- Libraries/GUI.lua | 7 +++++-- Libraries/System.lua | 2 +- 5 files changed, 34 insertions(+), 12 deletions(-) diff --git a/Applications/App Market.app/Main.lua b/Applications/App Market.app/Main.lua index b5801d11..51a2d51e 100644 --- a/Applications/App Market.app/Main.lua +++ b/Applications/App Market.app/Main.lua @@ -96,7 +96,15 @@ local updateFileList, editPublication, messagesItem -------------------------------------------------------------------------------- -local workspace, window = system.addWindow(GUI.filledWindow(1, 1, 127, 33, 0xF0F0F0)) +local windowsContainer = system.getWindowsContainer() + +local workspace, window, menu = system.addWindow(GUI.filledWindow( + 1, + 1, + math.min(127, windowsContainer.width), + math.min(33, windowsContainer.height), + 0xF0F0F0 +)) local leftListPanel = system.addBlurredOrDefaultPanel(window, 1, 1, 23, 1) @@ -428,7 +436,9 @@ local function checkForUnreadMessages() for _, dialog in pairs(dialogs) do if dialog.last_message_user_id ~= user.id and dialog.last_message_is_read == 0 then messagesItem.has_unread_messages = true - break + workspace:draw() + + return end end end @@ -1082,6 +1092,7 @@ end local function dialogGUI(to_user_name) local messages + if to_user_name then local result = fieldAPIRequest("result", "messages", { token = user.token, @@ -2051,9 +2062,6 @@ end loadConfig() --- Рисуем синюю писечку если надо -checkForUnreadMessages() - lastMethod = loadCategory if select(1, ...) == "updates" then @@ -2065,3 +2073,6 @@ else end window:resize(window.width, window.height) + +-- Рисуем синюю писечку если надо +checkForUnreadMessages() diff --git a/Applications/Finder.app/Main.lua b/Applications/Finder.app/Main.lua index 554db726..6f1a5b67 100644 --- a/Applications/Finder.app/Main.lua +++ b/Applications/Finder.app/Main.lua @@ -43,7 +43,15 @@ local pathHistoryCurrent = 0 -------------------------------------------------------------------------------- -local workspace, window, menu = system.addWindow(GUI.filledWindow(1, 1, 100, 26, 0xF0F0F0)) +local windowsContainer = system.getWindowsContainer() + +local workspace, window, menu = system.addWindow(GUI.filledWindow( + 1, + 1, + math.min(100, windowsContainer.width), + math.min(26, windowsContainer.height), + 0xF0F0F0 +)) local titlePanel = window:addChild(GUI.panel(1, 1, 1, 3, 0x3C3C3C)) diff --git a/Applications/Settings.app/Modules/0_Screen/Main.lua b/Applications/Settings.app/Modules/0_Screen/Main.lua index cc882d0b..53c9ddd4 100644 --- a/Applications/Settings.app/Modules/0_Screen/Main.lua +++ b/Applications/Settings.app/Modules/0_Screen/Main.lua @@ -90,7 +90,7 @@ module.onTouch = function() local maxWidth, maxHeight = screen.getMaxResolution() local limit = maxWidth * maxHeight - local lowerLimit = 30 + local lowerLimit = 25 local cykaTextBox = window.contentLayout:addChild(GUI.textBox(1, 1, 36, 1, nil, 0x880000, {string.format(localization.screenInvalidResolution, lowerLimit, limit)}, 1, 0, 0, true, true)) local autoscalingSwtich = window.contentLayout:addChild(GUI.switchAndLabel(1, 1, 36, 8, 0x66DB80, 0xE1E1E1, 0xFFFFFF, 0xA5A5A5, localization.screenAutoScale .. ":", userSettings.interfaceScreenAutoScale)).switch @@ -111,8 +111,8 @@ module.onTouch = function() width and height and width * height <= limit - and width > lowerLimit - and height > lowerLimit + and width >= lowerLimit + and height >= lowerLimit return width, height end diff --git a/Libraries/GUI.lua b/Libraries/GUI.lua index 6c755874..62870826 100755 --- a/Libraries/GUI.lua +++ b/Libraries/GUI.lua @@ -4156,8 +4156,11 @@ function GUI.dropDownMenu(x, y, width, maximumHeight, itemHeight, backgroundColo menu.scrollSpeed = 1 menu.itemsContainer = menu:addChild(GUI.container(1, 1, menu.width, menu.height)) - menu.prevButton = menu:addChild(GUI.button(1, 1, menu.width, 1, backgroundColor, textColor, backgroundPressedColor, textPressedColor, "▲")) - menu.nextButton = menu:addChild(GUI.button(1, 1, menu.width, 1, backgroundColor, textColor, backgroundPressedColor, textPressedColor, "▼")) + + -- RIP ▲▼ + -- ⬆⬇ + menu.prevButton = menu:addChild(GUI.button(1, 1, menu.width, 1, backgroundColor, textColor, backgroundPressedColor, textPressedColor, "⬆")) + menu.nextButton = menu:addChild(GUI.button(1, 1, menu.width, 1, backgroundColor, textColor, backgroundPressedColor, textPressedColor, "⬇")) menu.prevButton.colors.transparency, menu.nextButton.colors.transparency = backgroundTransparency, backgroundTransparency menu.prevButton.onTouch = dropDownMenuPrevButtonOnTouch menu.nextButton.onTouch = dropDownMenuNextButtonOnTouch diff --git a/Libraries/System.lua b/Libraries/System.lua index 39475581..0f88c22e 100755 --- a/Libraries/System.lua +++ b/Libraries/System.lua @@ -2467,7 +2467,7 @@ function system.updateDesktop() end dockContainer.width = #dockContainer.children * (userSettings.iconWidth + userSettings.iconHorizontalSpace) - userSettings.iconHorizontalSpace + 6 - dockContainer.localX = math.floor(workspace.width / 2 - dockContainer.width / 2) + dockContainer.localX = math.floor(workspace.width / 2 - dockContainer.width / 2 + 0.5) end dockContainer.updateIcons = function()