Skip to content

Commit 6f05015

Browse files
Merge pull request #394 from QueryaHub/issue/linux-cmake-and-dialog-sizes
fix(linux)+ui: secure_storage clang warning and larger dialogs
2 parents 3ee0190 + a17cef0 commit 6f05015

9 files changed

Lines changed: 33 additions & 19 deletions

File tree

‎lib/core/layout/window_layout.dart‎

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,16 @@ abstract class WindowLayout {
1010
static const double narrowWindowWidth = 720;
1111
static const double compactWindowWidth = 520;
1212

13+
/// Logical sizes for connection credential forms (Postgres/MySQL/Redis/…).
14+
static const double connectionFormMaxWidth = 700;
15+
static const double connectionFormMaxHeight = 760;
16+
static const double connectionFormMongoMaxHeight = 820;
17+
18+
/// Preferences / settings dialog.
19+
static const double preferencesDialogMaxWidth = 600;
20+
static const double preferencesDialogMinWidth = 420;
21+
static const double preferencesDialogMaxHeight = 760;
22+
1323
/// Horizontal inset for modal dialogs (clamped by screen).
1424
static double dialogHorizontalInset(double screenWidth) {
1525
return (screenWidth * 0.05).clamp(12.0, 48.0);
@@ -68,7 +78,7 @@ abstract class WindowLayout {
6878
context,
6979
screenExtent: mq.width,
7080
insetTotal: inset,
71-
baseMax: 740,
81+
baseMax: 860,
7282
baseMin: 280,
7383
viewportFactor: 1.0,
7484
);
@@ -81,9 +91,9 @@ abstract class WindowLayout {
8191
context,
8292
screenExtent: mq.height,
8393
insetTotal: inset,
84-
baseMax: 580,
94+
baseMax: 680,
8595
baseMin: 320,
86-
viewportFactor: 0.78,
96+
viewportFactor: 0.85,
8797
);
8898
}
8999

‎lib/features/connections/extension_connection_form.dart‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -174,8 +174,8 @@ class _ExtensionConnectionFormContentState
174174
return material.Container(
175175
constraints: WindowLayout.dialogConstraints(
176176
context,
177-
maxWidth: 520,
178-
minWidth: 400,
177+
maxWidth: WindowLayout.connectionFormMaxWidth,
178+
minWidth: 440,
179179
),
180180
decoration: material.BoxDecoration(
181181
color: theme.popover,

‎lib/features/connections/new_connection_url_dialog.dart‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,8 @@ class _NewConnectionUrlDialogContentState
5252
return material.Container(
5353
constraints: WindowLayout.dialogConstraints(
5454
context,
55-
maxWidth: 500,
56-
minWidth: 380,
55+
maxWidth: 580,
56+
minWidth: 420,
5757
),
5858
decoration: material.BoxDecoration(
5959
color: theme.popover,

‎lib/features/mongodb/mongodb_connection_form.dart‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -305,8 +305,8 @@ class _MongoConnectionFormContentState
305305
return material.Container(
306306
constraints: WindowLayout.dialogConstraints(
307307
context,
308-
maxWidth: 600,
309-
maxHeight: 700,
308+
maxWidth: WindowLayout.connectionFormMaxWidth,
309+
maxHeight: WindowLayout.connectionFormMongoMaxHeight,
310310
),
311311
decoration: material.BoxDecoration(
312312
color: theme.popover,

‎lib/features/mysql/mysql_connection_form.dart‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -274,8 +274,8 @@ class _MysqlConnectionFormContentState
274274
return material.Container(
275275
constraints: WindowLayout.dialogConstraints(
276276
context,
277-
maxWidth: 600,
278-
maxHeight: 640,
277+
maxWidth: WindowLayout.connectionFormMaxWidth,
278+
maxHeight: WindowLayout.connectionFormMaxHeight,
279279
),
280280
decoration: material.BoxDecoration(
281281
color: theme.popover,

‎lib/features/postgresql/postgresql_connection_form.dart‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -388,8 +388,8 @@ class _PostgresConnectionFormContentState
388388
return material.Container(
389389
constraints: WindowLayout.dialogConstraints(
390390
context,
391-
maxWidth: 600,
392-
maxHeight: 640,
391+
maxWidth: WindowLayout.connectionFormMaxWidth,
392+
maxHeight: WindowLayout.connectionFormMaxHeight,
393393
),
394394
decoration: material.BoxDecoration(
395395
color: theme.popover,

‎lib/features/redis/redis_connection_form.dart‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -249,8 +249,8 @@ class _RedisConnectionFormContentState
249249
return material.Container(
250250
constraints: WindowLayout.dialogConstraints(
251251
context,
252-
maxWidth: 600,
253-
maxHeight: 640,
252+
maxWidth: WindowLayout.connectionFormMaxWidth,
253+
maxHeight: WindowLayout.connectionFormMaxHeight,
254254
),
255255
decoration: material.BoxDecoration(
256256
color: theme.popover,

‎lib/features/settings/preferences_dialog.dart‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -105,9 +105,9 @@ class _PreferencesDialogContentState
105105
child: material.Container(
106106
constraints: WindowLayout.dialogConstraints(
107107
context,
108-
maxWidth: 480,
109-
minWidth: 360,
110-
maxHeight: 640,
108+
maxWidth: WindowLayout.preferencesDialogMaxWidth,
109+
minWidth: WindowLayout.preferencesDialogMinWidth,
110+
maxHeight: WindowLayout.preferencesDialogMaxHeight,
111111
),
112112
decoration: material.BoxDecoration(
113113
color: theme.popover,

‎linux/CMakeLists.txt‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,11 @@ endif()
4141
# of modifying this function.
4242
function(APPLY_STANDARD_SETTINGS TARGET)
4343
target_compile_features(${TARGET} PUBLIC cxx_std_14)
44-
target_compile_options(${TARGET} PRIVATE -Wall -Werror)
44+
# flutter_secure_storage_linux 9.x ships an old nlohmann/json.hpp that
45+
# trips -Wdeprecated-literal-operator under newer Clang.
46+
# Upstream fix is in flutter_secure_storage 10+; silence until then.
47+
target_compile_options(${TARGET} PRIVATE
48+
-Wall -Werror -Wno-deprecated-literal-operator)
4549
target_compile_options(${TARGET} PRIVATE "$<$<NOT:$<CONFIG:Debug>>:-O3>")
4650
target_compile_definitions(${TARGET} PRIVATE "$<$<NOT:$<CONFIG:Debug>>:NDEBUG>")
4751
endfunction()

0 commit comments

Comments
 (0)