feat: responsive compact mail view + folder unread badges
- CompactMailDelegate: card-based view for narrow panels (<420px) * Avatar with hash-based color, sender + date (relative format) * Subject line with attachment icon * Action buttons: flag, delete, category, more (context menu) * Unread highlight with light blue background + bold sender - MailListView: automatic switch between tree/table (wide) and list/cards (narrow) * QStackedWidget with QTreeView + QListView sharing same proxy model * resizeEvent threshold at 420px * Signals forwarded to MainMainWindow for actions - FolderTreeDelegate: custom paint for folder tree * Unread count badge (blue pill) right-aligned on folder nodes * Account nodes bold, folder nodes normal weight * Proper indentation per depth level - MailItemDao::countUnreadByFolderId() for real-time unread counts - MainMainWindow handlers for compact actions (flag, delete, category, more menu)
This commit is contained in:
+87
@@ -0,0 +1,87 @@
|
||||
# Distributed under the OSI-approved BSD 3-Clause License. See accompanying
|
||||
# file LICENSE.rst or https://cmake.org/licensing for details.
|
||||
|
||||
cmake_minimum_required(VERSION ${CMAKE_VERSION}) # this file comes with cmake
|
||||
|
||||
if(EXISTS "/mnt/c/Users/javie/Documents/Codex/2026-08-11/revisar-2/wino-mail-dtkqt/build_win/_deps/boost-subbuild/boost-populate-prefix/src/boost-populate-stamp/boost-populate-gitclone-lastrun.txt" AND EXISTS "/mnt/c/Users/javie/Documents/Codex/2026-08-11/revisar-2/wino-mail-dtkqt/build_win/_deps/boost-subbuild/boost-populate-prefix/src/boost-populate-stamp/boost-populate-gitinfo.txt" AND
|
||||
"/mnt/c/Users/javie/Documents/Codex/2026-08-11/revisar-2/wino-mail-dtkqt/build_win/_deps/boost-subbuild/boost-populate-prefix/src/boost-populate-stamp/boost-populate-gitclone-lastrun.txt" IS_NEWER_THAN "/mnt/c/Users/javie/Documents/Codex/2026-08-11/revisar-2/wino-mail-dtkqt/build_win/_deps/boost-subbuild/boost-populate-prefix/src/boost-populate-stamp/boost-populate-gitinfo.txt")
|
||||
message(VERBOSE
|
||||
"Avoiding repeated git clone, stamp file is up to date: "
|
||||
"'/mnt/c/Users/javie/Documents/Codex/2026-08-11/revisar-2/wino-mail-dtkqt/build_win/_deps/boost-subbuild/boost-populate-prefix/src/boost-populate-stamp/boost-populate-gitclone-lastrun.txt'"
|
||||
)
|
||||
return()
|
||||
endif()
|
||||
|
||||
# Even at VERBOSE level, we don't want to see the commands executed, but
|
||||
# enabling them to be shown for DEBUG may be useful to help diagnose problems.
|
||||
cmake_language(GET_MESSAGE_LOG_LEVEL active_log_level)
|
||||
if(active_log_level MATCHES "DEBUG|TRACE")
|
||||
set(maybe_show_command COMMAND_ECHO STDOUT)
|
||||
else()
|
||||
set(maybe_show_command "")
|
||||
endif()
|
||||
|
||||
execute_process(
|
||||
COMMAND ${CMAKE_COMMAND} -E rm -rf "/mnt/c/Users/javie/Documents/Codex/2026-08-11/revisar-2/wino-mail-dtkqt/build_win/_deps/boost-src"
|
||||
RESULT_VARIABLE error_code
|
||||
${maybe_show_command}
|
||||
)
|
||||
if(error_code)
|
||||
message(FATAL_ERROR "Failed to remove directory: '/mnt/c/Users/javie/Documents/Codex/2026-08-11/revisar-2/wino-mail-dtkqt/build_win/_deps/boost-src'")
|
||||
endif()
|
||||
|
||||
# try the clone 3 times in case there is an odd git clone issue
|
||||
set(error_code 1)
|
||||
set(number_of_tries 0)
|
||||
while(error_code AND number_of_tries LESS 3)
|
||||
execute_process(
|
||||
COMMAND "/usr/bin/git"
|
||||
clone --no-checkout --depth 1 --no-single-branch --config "advice.detachedHead=false" "https://github.com/boostorg/boost.git" "boost-src"
|
||||
WORKING_DIRECTORY "/mnt/c/Users/javie/Documents/Codex/2026-08-11/revisar-2/wino-mail-dtkqt/build_win/_deps"
|
||||
RESULT_VARIABLE error_code
|
||||
${maybe_show_command}
|
||||
)
|
||||
math(EXPR number_of_tries "${number_of_tries} + 1")
|
||||
endwhile()
|
||||
if(number_of_tries GREATER 1)
|
||||
message(NOTICE "Had to git clone more than once: ${number_of_tries} times.")
|
||||
endif()
|
||||
if(error_code)
|
||||
message(FATAL_ERROR "Failed to clone repository: 'https://github.com/boostorg/boost.git'")
|
||||
endif()
|
||||
|
||||
execute_process(
|
||||
COMMAND "/usr/bin/git"
|
||||
checkout "boost-1.85.0" --
|
||||
WORKING_DIRECTORY "/mnt/c/Users/javie/Documents/Codex/2026-08-11/revisar-2/wino-mail-dtkqt/build_win/_deps/boost-src"
|
||||
RESULT_VARIABLE error_code
|
||||
${maybe_show_command}
|
||||
)
|
||||
if(error_code)
|
||||
message(FATAL_ERROR "Failed to checkout tag: 'boost-1.85.0'")
|
||||
endif()
|
||||
|
||||
set(init_submodules TRUE)
|
||||
if(init_submodules)
|
||||
execute_process(
|
||||
COMMAND "/usr/bin/git"
|
||||
submodule update --recursive --init
|
||||
WORKING_DIRECTORY "/mnt/c/Users/javie/Documents/Codex/2026-08-11/revisar-2/wino-mail-dtkqt/build_win/_deps/boost-src"
|
||||
RESULT_VARIABLE error_code
|
||||
${maybe_show_command}
|
||||
)
|
||||
endif()
|
||||
if(error_code)
|
||||
message(FATAL_ERROR "Failed to update submodules in: '/mnt/c/Users/javie/Documents/Codex/2026-08-11/revisar-2/wino-mail-dtkqt/build_win/_deps/boost-src'")
|
||||
endif()
|
||||
|
||||
# Complete success, update the script-last-run stamp file:
|
||||
#
|
||||
execute_process(
|
||||
COMMAND ${CMAKE_COMMAND} -E copy "/mnt/c/Users/javie/Documents/Codex/2026-08-11/revisar-2/wino-mail-dtkqt/build_win/_deps/boost-subbuild/boost-populate-prefix/src/boost-populate-stamp/boost-populate-gitinfo.txt" "/mnt/c/Users/javie/Documents/Codex/2026-08-11/revisar-2/wino-mail-dtkqt/build_win/_deps/boost-subbuild/boost-populate-prefix/src/boost-populate-stamp/boost-populate-gitclone-lastrun.txt"
|
||||
RESULT_VARIABLE error_code
|
||||
${maybe_show_command}
|
||||
)
|
||||
if(error_code)
|
||||
message(FATAL_ERROR "Failed to copy script-last-run stamp file: '/mnt/c/Users/javie/Documents/Codex/2026-08-11/revisar-2/wino-mail-dtkqt/build_win/_deps/boost-subbuild/boost-populate-prefix/src/boost-populate-stamp/boost-populate-gitclone-lastrun.txt'")
|
||||
endif()
|
||||
Reference in New Issue
Block a user