Fix settings layouts

This commit is contained in:
Petr Mironychev 2024-09-08 14:31:52 +02:00
parent 397dd33a96
commit 539a220771
3 changed files with 12 additions and 13 deletions

View File

@ -1,6 +1,6 @@
{
"Name" : "QodeAssist",
"Version" : "0.1.0",
"Version" : "0.1.1",
"CompatVersion" : "${IDE_VERSION_COMPAT}",
"Vendor" : "Petr Mironychev",
"Copyright" : "(C) ${IDE_COPYRIGHT_YEAR} Petr Mironychev, (C) ${IDE_COPYRIGHT_YEAR} The Qt Company Ltd",

View File

@ -85,8 +85,8 @@ ContextSettings::ContextSettings()
setLayouter([this]() {
using namespace Layouting;
return Column{Row{readFullFile, Stretch{1}, resetToDefaults},
readStringsBeforeCursor,
readStringsAfterCursor,
Row{readStringsBeforeCursor, Stretch{1}},
Row{readStringsAfterCursor, Stretch{1}},
useFilePathInContext,
useSpecificInstructions,
specificInstractions,

View File

@ -62,22 +62,20 @@ GeneralSettings::GeneralSettings()
multiLineCompletion.setLabelText(Tr::tr("Enable Multiline Completion"));
startSuggestionTimer.setSettingsKey(Constants::START_SUGGESTION_TIMER);
startSuggestionTimer.setLabelText(Tr::tr("Start Suggestion Timer:"));
startSuggestionTimer.setLabelText(Tr::tr("with delay(ms)"));
startSuggestionTimer.setRange(10, 10000);
startSuggestionTimer.setDefaultValue(500);
autoCompletionCharThreshold.setSettingsKey(Constants::AUTO_COMPLETION_CHAR_THRESHOLD);
autoCompletionCharThreshold.setLabelText(
Tr::tr("Character threshold for AI suggestion start:"));
autoCompletionCharThreshold.setLabelText(Tr::tr("AI suggestion triggers after typing"));
autoCompletionCharThreshold.setToolTip(
Tr::tr("The number of characters that need to be typed within the typing interval "
"before an AI suggestion request is sent."));
autoCompletionCharThreshold.setRange(1, 10);
autoCompletionCharThreshold.setDefaultValue(2);
autoCompletionCharThreshold.setRange(0, 10);
autoCompletionCharThreshold.setDefaultValue(1);
autoCompletionTypingInterval.setSettingsKey(Constants::AUTO_COMPLETION_TYPING_INTERVAL);
autoCompletionTypingInterval.setLabelText(
Tr::tr("Typing interval for AI suggestion start(ms):"));
autoCompletionTypingInterval.setLabelText(Tr::tr("character(s) within(ms)"));
autoCompletionTypingInterval.setToolTip(
Tr::tr("The time window (in milliseconds) during which the character threshold "
"must be met to trigger an AI suggestion request."));
@ -138,10 +136,11 @@ GeneralSettings::GeneralSettings()
auto rootLayout = Column{Row{enableQodeAssist, Stretch{1}, resetToDefaults},
enableAutoComplete,
startSuggestionTimer,
autoCompletionCharThreshold,
autoCompletionTypingInterval,
multiLineCompletion,
Row{autoCompletionCharThreshold,
autoCompletionTypingInterval,
startSuggestionTimer,
Stretch{1}},
Space{8},
enableLogging,
Space{8},