Skip to content
This repository was archived by the owner on Feb 13, 2024. It is now read-only.

Hide autocomplete on timer start #3974

Open
wants to merge 84 commits into
base: feature/linux-qml
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
84 commits
Select commit Hold shift + click to select a range
1368167
Implement a mockup login screen with QML (linux)
MartinBriza Oct 14, 2019
f508c39
Enable displaying errors (linux)
MartinBriza Oct 14, 2019
02e78d3
Animate the error overlay (linux)
MartinBriza Oct 14, 2019
a640e0b
Enable hitting Return on text fields to log in (linux)
MartinBriza Oct 14, 2019
4751430
Move views to separate files, handle onDisplayError signal (linux)
MartinBriza Oct 14, 2019
af09fac
Start implementing time entry view (linux)
MartinBriza Oct 14, 2019
4426e52
Display basic time entry info, implement mockup Timer (linux)
MartinBriza Oct 14, 2019
2582333
Make the Timer work almost right (linux)
MartinBriza Oct 14, 2019
bb58434
Make starting and stopping work mostly as expected
MartinBriza Oct 14, 2019
4a77a46
Enable editing the duration but it doesn't work right (linux)
MartinBriza Oct 14, 2019
7323d6d
Make the timer look prettier (linux)
MartinBriza Oct 14, 2019
1d2b1fc
Enable working with the time entry list (linux)
MartinBriza Oct 14, 2019
2b16502
Make the timer a lot prettier (linux)
MartinBriza Oct 14, 2019
a0c5288
Implement a basic menu (linux)
MartinBriza Oct 14, 2019
2dcf92a
Add headers and scrollbars to the items in the list (linux)
MartinBriza Oct 14, 2019
8d71d0a
Make everything look a bit more similar to the current app (linux)
MartinBriza Oct 14, 2019
d38ce51
Force native font rendering (linux)
MartinBriza Oct 15, 2019
7fa2a6c
Handle signup country ID right (linux)
MartinBriza Oct 15, 2019
a4c228c
Don't do anything on Google signup (linux)
MartinBriza Oct 15, 2019
bd2d9b5
Clip the error overlay to avoid red flickers (linux)
MartinBriza Oct 15, 2019
7bf9820
Add a readonly Time Entry View (linux)
MartinBriza Oct 15, 2019
0e4a7d0
Basic nonfunctional autocomplete implementation (linux)
MartinBriza Oct 15, 2019
47f7e46
Reuse the old AutocompleteListModel class to implement filtering (linux)
MartinBriza Oct 15, 2019
7aace13
Meh autocomplete is broken this way, i'll have to rewrite it but i do…
MartinBriza Oct 15, 2019
97d15bf
Some lame attempts at animating the time entry list (linux)
MartinBriza Oct 15, 2019
657cf51
(Probably) implement a list model that handles time entry list change…
MartinBriza Oct 16, 2019
eaf4769
Because GUIDs are not really unique, handle special cases and create …
MartinBriza Oct 17, 2019
87c315c
Make working with the time entry list prettier (linux)
MartinBriza Oct 17, 2019
31a892b
Make Autocomplete work mostly as expected
MartinBriza Oct 17, 2019
4171481
Get "heavily inspired" by the macOS design (linux)
MartinBriza Oct 18, 2019
0464da4
UI tweaks, especially placing the time entry edit view next to the wi…
MartinBriza Oct 18, 2019
246cbca
Enable adding and removing tags in a nice fashion (linux)
MartinBriza Oct 18, 2019
0ea4420
Lay out the tags on a line (linux)
MartinBriza Oct 18, 2019
451fbca
Redesign the QML project UI (linux)
MartinBriza Oct 18, 2019
b6e0aca
Make the Linux app compile on macOS (all)
MartinBriza Nov 29, 2019
ed3b107
Try building this in GitHub Actions (macos)
MartinBriza Nov 29, 2019
c106b5f
Fix colors in darkmode (linux)
MartinBriza Nov 29, 2019
5940cb3
Make the timer look more like the macOS app (linux)
MartinBriza Nov 29, 2019
063ca36
Fix the Actions workflow (macos)
MartinBriza Nov 29, 2019
32ba9b8
Make the time entry list look similar to macOS (linux)
MartinBriza Nov 29, 2019
95696c2
...
MartinBriza Nov 29, 2019
1336035
Split off shadows and list items into separate items (linux)
MartinBriza Dec 2, 2019
cbc4503
Prune undefined references (linux)
MartinBriza Dec 3, 2019
9c3e0f9
Fix up the look of the Time Entry Editor view (linux)
MartinBriza Dec 3, 2019
521fe2b
Get rid of all unnecessary C++ UI code (linux)
MartinBriza Dec 3, 2019
35119b1
Fix QML C++ bindings (linux)
MartinBriza Dec 3, 2019
81970e3
Format main.cpp (linux)
MartinBriza Dec 3, 2019
166c8a1
Work on improving the design and clean up the QML code (linux)
MartinBriza Dec 3, 2019
6c27fa5
Fix type errors (linux)
MartinBriza Dec 3, 2019
840cf07
Make the time entry labels look more like on macOS (linux)
MartinBriza Dec 3, 2019
3fa2c29
Style autocomplete to look more like on macOS (linux)
MartinBriza Dec 3, 2019
599fac4
Keep left margin in open group items in the list (linux)
MartinBriza Dec 3, 2019
b42af7a
Fix linux build (linux)
MartinBriza Dec 3, 2019
cb8025c
Make the Linux app compile on Windows (win)
MartinBriza Dec 3, 2019
2f8c646
Use QQC1 ScrollView because it doesn't glitch on macOS (linux)
MartinBriza Dec 4, 2019
968e131
Fix string issues (linux)
MartinBriza Dec 4, 2019
f4dea67
Rename palette to mainPalette to avoid conflicts (linux)
MartinBriza Dec 4, 2019
27cfdae
Make the TE Editor a bit prettier (linux)
MartinBriza Dec 4, 2019
ea1edd6
Reintroduce main window menu, connect some actions (linux)
MartinBriza Dec 4, 2019
186df52
Touch up the look of the login view (linux)
MartinBriza Dec 4, 2019
c654f7d
Add an inline Time Entry Editor to the List (linux)
MartinBriza Dec 5, 2019
3c1ac5b
Disable the annoying flickering in the delegate (linux)
MartinBriza Dec 5, 2019
2c34afc
Fix crash with autocomplete (linux)
MartinBriza Dec 5, 2019
16ab462
Make autocomplete actually do something for Time Entries (linux)
MartinBriza Dec 5, 2019
973b7ee
Hide group count when an entry is expanded (linux)
MartinBriza Dec 5, 2019
482b89d
Fix typo
MartinBriza Dec 5, 2019
bc2cf81
Make the duration layout in the editor responsive (linux)
MartinBriza Dec 5, 2019
e510a9e
Allow actually logging in (linux)
MartinBriza Dec 6, 2019
624a7a4
Start implementing the date picker (linux)
MartinBriza Dec 6, 2019
0d9204a
Make the Arrow element separate (linux)
MartinBriza Dec 9, 2019
e4e3bcc
Fix the terminal spam from Autocomplete (linux)
MartinBriza Dec 9, 2019
0f9fbc1
Implement an embedded calendar widget (linux)
MartinBriza Dec 9, 2019
7f1fb92
Improve Calendar performance by loading it on demand (linux)
MartinBriza Dec 9, 2019
f9dcf2e
Fix some more QML errors in the terminal (linux)
MartinBriza Dec 10, 2019
209009e
Make space for the calendar by hiding some UI elements (linux)
MartinBriza Dec 10, 2019
3f8371c
Set dates right (linux)
MartinBriza Dec 11, 2019
8bf3589
Added app build command for qt in mac
IndrekV Dec 13, 2019
0c7e424
Improve login view look (especially the horrible blue) (linux)
MartinBriza Dec 13, 2019
bc6dae5
Return the preferences dialog (linux)
MartinBriza Dec 13, 2019
169b6cf
Actually display errors (linux)
MartinBriza Dec 13, 2019
e07868d
Merge branch 'master' into feature/linux-qml
MartinBriza Apr 1, 2020
4e4f0f0
Probably fix build on macOS (lib)
MartinBriza Apr 6, 2020
431cd29
Now actually probably fix it (lib)
MartinBriza Apr 6, 2020
0e6b285
Hide autocomplete on timer start
jiri Apr 6, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 43 additions & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,48 @@ on:
types: [ created ]

jobs:
macos-qt:
runs-on: macOS-latest
steps:
- uses: actions/checkout@v1
with:
fetch-depth: 1
- name: Import signing key
run: |
# Create a new keychian and make it default
security create-keychain -p password build.keychain
security default-keychain -s ~/Library/Keychains/build.keychain

# Mac Developer Certificate
base64 -D <<< "${{ secrets.CERT_MACOS_DEVELOPMENT }}" > Bundle_cert_macos_development.p12
security import ./Bundle_cert_macos_development.p12 -k ~/Library/Keychains/build.keychain -P ${{ secrets.CERT_MACOS_DEVELOPMENT_PASSWORD }} -T /usr/bin/codesign

# Application Certificate
base64 -D <<< "${{ secrets.CERT_MACOS_APPLICATION }}" > Bundle_cert_macos_distribution.p12
security import ./Bundle_cert_macos_distribution.p12 -k ~/Library/Keychains/build.keychain -P ${{ secrets.CERT_MACOS_APPLICATION_PASSWORD }} -T /usr/bin/codesign

# Installer Certificate
base64 -D <<< "${{ secrets.CERT_MACOS_INSTALLER }}" > Bundle_cert_macos_installer.p12
security import ./Bundle_cert_macos_installer.p12 -k ~/Library/Keychains/build.keychain -P ${{ secrets.CERT_MACOS_INSTALLER_PASSWORD }} -T /usr/bin/codesign

# Unlock
security unlock-keychain -p password ~/Library/Keychains/build.keychain
security set-keychain-settings -lu
security set-key-partition-list -S apple-tool:,apple:,codesign: -s -k password ~/Library/Keychains/build.keychain
- name: Install the dependencies
run: |
brew install qt
brew install openssl
brew install cmake
- name: Build the application
run: |
mkdir build
cd build
export CMAKE_PREFIX_PATH=/usr/local/opt/qt5/lib/cmake
export OPENSSL_ROOT_DIR=/usr/local/opt/[email protected]/
cmake -DTOGGL_BUILD_TESTS=OFF -DOPENSSL_ROOT_DIR=$OPENSSL_ROOT_DIR ..
make -j2

macos:
runs-on: macOS-latest
steps:
Expand Down Expand Up @@ -108,7 +150,7 @@ jobs:
- name: Install dependencies
run: |
sudo apt update
sudo apt install libxss1 libgstreamer-plugins-base1.0-0 libgstreamer1.0-0 qt5-default libqt5gui5 libqt5webengine5 libqt5webenginecore5 libqt5webenginewidgets5 libqt5printsupport5 libqt5quickwidgets5 libqt5x11extras5 libxss1
sudo apt install libxss1 libgstreamer-plugins-base1.0-0 libgstreamer1.0-0 qt5-default libqt5gui5 libqt5webengine5 libqt5webenginecore5 libqt5webenginewidgets5 libqt5printsupport5 libqt5quickwidgets5 libqt5x11extras5 libxss1
sudo apt install patchelf binutils cmake pkg-config qtbase5-dev qtwebengine5-dev libqt5x11extras5-dev qtbase5-private-dev libssl-dev libxss-dev libxmu-dev
- name: Build the Linux binary
run: |
Expand Down
12 changes: 10 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ option(TOGGL_PRODUCTION_BUILD "Use production servers in the app" OFF)
option(TOGGL_ALLOW_UPDATE_CHECK "Allow the app to check for updates" OFF)
option(USE_BUNDLED_LIBRARIES "Prefer bundled libraries to bundled ones" OFF)
option(INSTALL_HIRES_ICONS "Do not install icons over 512x512" OFF)
option(TOGGL_BUILD_TESTS "Build the Toggl test suite" ON)

set(ENV{OPENSSL_ROOT_DIR} ${OPENSSL_ROOT_DIR})

if ("${TOGGL_VERSION}" STREQUAL "7.0.0")
find_package (Git)
Expand All @@ -40,11 +43,14 @@ include(FindPkgConfig)

# Look for Qt
find_package(Qt5Widgets CONFIG REQUIRED)
find_package(Qt5QuickWidgets CONFIG REQUIRED)
find_package(Qt5DBus CONFIG REQUIRED)
find_package(Qt5Network CONFIG REQUIRED)
find_package(Qt5WebEngine CONFIG REQUIRED)
find_package(Qt5WebEngineWidgets CONFIG REQUIRED)
find_package(Qt5X11Extras CONFIG REQUIRED)
if(UNIX AND NOT APPLE)
find_package(Qt5X11Extras CONFIG REQUIRED)
endif()
# We need to include private headers manually
include_directories( ${Qt5Widgets_PRIVATE_INCLUDE_DIRS} )

Expand Down Expand Up @@ -83,5 +89,7 @@ set(CMAKE_INSTALL_RPATH "${TOGGL_LIB_DIR};${TOGGL_INTERNAL_LIB_DIR}" CACHE STRIN

add_subdirectory(third_party)
add_subdirectory(src)
add_subdirectory(src/test)
if (TOGGL_BUILD_TESTS)
add_subdirectory(src/test)
endif()
add_subdirectory(src/ui/linux/TogglDesktop)
5 changes: 5 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,11 @@ qa: lint fmt cppclean test

fmt: fmt_lib fmt_ui


app_qt:
mkdir -p build && cd build && cmake -DOPENSSL_ROOT_DIR="/usr/local/opt/[email protected]" -DTOGGL_BUILD_TESTS=OFF .. && make
./build/src/ui/linux/TogglDesktop/TogglDesktop

ifeq ($(uname), Linux)
app:
mkdir -p build && cd build && cmake .. && make
Expand Down
29 changes: 27 additions & 2 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ if(TOGGL_ALLOW_UPDATE_CHECK)
add_definitions(-DTOGGL_ALLOW_UPDATE_CHECK=1)
endif()

add_definitions(-DTOGGL_BUILD_TYPE="${TOGGL_BUILD_TYPE}")
add_definitions(-DTOGGL_BUILD_TYPE="${TOGGL_BUILD_TYPE}" -DTOGGLDESKTOP_DLL_BUILD)

set(TOGGLDESKTOPLIBRARY_INCLUDE_DIR
${CMAKE_CURRENT_SOURCE_DIR}
Expand All @@ -29,6 +29,7 @@ include_directories(
${LUA_INCLUDE_DIRS}
${JSONCPP_INCLUDE_DIRS}
${POCO_INCLUDE_DIRS}
$ENV{OPENSSL_ROOT_DIR}/include
)

# TogglDesktopLibrary sources
Expand All @@ -49,7 +50,6 @@ set(LIBRARY_SOURCE_FILES
database.cc
feedback.cc
formatter.cc
get_focused_window_linux.cc
error.cc
gui.cc
netconf.cc
Expand All @@ -76,11 +76,36 @@ set(LIBRARY_SOURCE_FILES
workspace.cc
)

if(APPLE)
set(LIBRARY_SOURCE_FILES
${LIBRARY_SOURCE_FILES}
get_focused_window_mac.cc
lib/osx/Kopsik/MacOSVersionChecker.mm
lib/osx/Kopsik/MacOSApplicationInfo.mm
)
set(ADDITIONAL_LIBRARIES
"-framework Foundation"
"-framework CFNetwork"
"-framework AppKit"
)
elseif(WIN32)
set(LIBRARY_SOURCE_FILES
${LIBRARY_SOURCE_FILES}
get_focused_window_windows.cc
)
else()
set(LIBRARY_SOURCE_FILES
${LIBRARY_SOURCE_FILES}
get_focused_window_linux.cc
)
endif()

# Set up compilation targets
add_library(TogglDesktopLibrary SHARED ${LIBRARY_SOURCE_FILES})

# And list the dependencies between them (and system libraries)
target_link_libraries(TogglDesktopLibrary PRIVATE
${ADDITIONAL_LIBRARIES}
${JSONCPP_LIBRARIES}
${LUA_LIBRARIES}
PocoCrypto PocoDataSQLite PocoNetSSL
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>IDEDidComputeMac32BitWarning</key>
<true/>
</dict>
</plist>
4 changes: 2 additions & 2 deletions src/platforminfo.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,14 @@ std::map<std::string, std::string> RetrieveOsDetailsMap();
inline void RetrieveOsDetails(std::stringstream &ss) {

}
std::map<std::string, std::string> RetrieveOsDetailsMap() {
inline std::map<std::string, std::string> RetrieveOsDetailsMap() {
return {};
}
#elif defined(__APPLE__)
inline void RetrieveOsDetails(std::stringstream &ss) {

}
std::map<std::string, std::string> RetrieveOsDetailsMap() {
inline std::map<std::string, std::string> RetrieveOsDetailsMap() {
return {};
}
#endif
Expand Down
23 changes: 23 additions & 0 deletions src/ui/linux/TogglDesktop/Arrow.qml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
import QtQuick 2.0

Item {
width: 7
height: 3
Rectangle {
smooth: true
anchors.verticalCenter: parent.verticalCenter
width: 4
height: 1
rotation: 45
opacity: 0.5
}
Rectangle {
smooth: true
x: 3
anchors.verticalCenter: parent.verticalCenter
width: 4
height: 1
rotation: -45
opacity: 0.5
}
}
Loading