This commit is contained in:
Santiago Lema 2025-05-08 03:47:56 -03:00
parent 392dc320b9
commit cdbcd0004c
2 changed files with 44 additions and 39 deletions

BIN
DumBer

Binary file not shown.

View file

@ -43,7 +43,7 @@ MainWindow::MainWindow()
BLayoutBuilder::Group<>(this, B_VERTICAL, 0).Add(menuBar).AddGlue().End();
_inputField = new BTextView("input_view", B_WILL_DRAW | B_FOLLOW_ALL);
_inputField = new BTextView("input_view", B_WILL_DRAW);
_inputField->SetText("What is the matrix... printer, Neo ?");
_inputField->MakeEditable(true);
_inputField->MakeSelectable(true);
@ -91,7 +91,7 @@ MainWindow::MainWindow()
_sendButton->MakeDefault(true);
_answerView = new BTextView("answer", B_WILL_DRAW | B_FOLLOW_ALL);
_answerView = new BTextView("answer", B_WILL_DRAW);
_answerView->MakeEditable(false); // Disable editing
_answerView->MakeSelectable(true); // Enable text selection
_answerView->SetWordWrap(true);
@ -114,50 +114,55 @@ MainWindow::MainWindow()
new BStringView("questionLabel", "Your question: ");
BStringView *headerAnswer = new BStringView("questionAnswer", "Answer: ");
rgb_color colorQuestion = {100, 100,150, 255};
//rgb_color colorAnswer = {100, 100,150, 255};
//high color = txt
headerQuestion->SetHighColor(colorQuestion);
headerAnswer->SetHighColor(colorQuestion);
BLayoutBuilder::Group<>(this, B_VERTICAL, 0)
.AddGlue(0.1)
.Add(headerQuestion)
.AddGroup(B_HORIZONTAL, 0, 1)
.Add(_inputField, 0.25)
.AddGroup(B_HORIZONTAL, 0, 0)
.AddGlue()
.AddGroup(B_VERTICAL, 0, 1)
// .Add(imageView)
.AddGlue(0.1)
.Add(headerQuestion)
.AddGroup(B_HORIZONTAL, 0, 1)
.Add(_inputField)
.AddGlue(0.01)
.AddGroup(B_VERTICAL, B_USE_DEFAULT_SPACING, 0)
. AddGroup(B_HORIZONTAL, 0)
.Add(_infoConversation).AddGlue(0.1)
.End()
. AddGroup(B_HORIZONTAL, 0)
.Add(_modelField).AddGlue(0.1)
.End()
. AddGroup(B_HORIZONTAL, 0)
.Add(_sendButton).AddGlue(0.1)
.End()
.End()
.End()
// .AddGlue()
.AddGlue(0.1)
.Add(headerAnswer)
.AddGroup(B_VERTICAL, B_USE_DEFAULT_SPACING, 1.0)
.AddGroup(B_HORIZONTAL, 0, 1) // left-align cnv
.Add(_infoConversation)
.AddGlue()
.End()
.AddGlue()
.Add(_answerScrollView, 1)
.Add(_progress,0.1)
.Add(_infoView,0.1)
.End()
.SetInsets(6,6, 6, 6)
.AddGroup(B_HORIZONTAL, 0, 1) // left-align _modelField
.Add(_modelField)
.AddGlue()
.End()
.AddGroup(B_HORIZONTAL, 0, 1) // left-align _sendButton
.Add(_sendButton)
.AddGlue()
.End()
.End()
.SetInsets(12, 6, 12, 0)
.End()
.End()
.AddGlue(0.1)
.Add(headerAnswer)
.Add(_answerScrollView, 1)
.Add(_progress)
.Add(_infoView)
.SetInsets(6, 6, 6, 6)
.End();
// Loop Just to animate progress in Bar