mirror of
https://github.com/SpartanJ/eepp.git
synced 2026-08-15 05:33:14 +03:00
Some UI widgets constructor refactor and minor function renaming.
Added Moonshot LLM models support.
This commit is contained in:
@@ -1104,8 +1104,8 @@ UTEST( FontRendering, UITextViewWrappedSelection ) {
|
||||
textView->setPixelsSize( app.getUI()->getPixelsSize() );
|
||||
textView->setText( buffer );
|
||||
textView->setWordWrap( true );
|
||||
textView->setTextSelection( true );
|
||||
textView->setSelection( { 51, 286 } );
|
||||
textView->setTextSelectionEnabled( true );
|
||||
textView->setTextSelectionRange( { 51, 286 } );
|
||||
SceneManager::instance()->update();
|
||||
SceneManager::instance()->draw();
|
||||
compareImages( utest_state, utest_result, app.getWindow(),
|
||||
@@ -1206,7 +1206,7 @@ UTEST( FontRendering, TextSelection ) {
|
||||
|
||||
// Test 1: Single line selection (Line 1)
|
||||
{
|
||||
std::vector<Rectf> rects = text.getSelectionRects( 0, 4 ); // "Line"
|
||||
std::vector<Rectf> rects = text.getSelectionRects( { 0, 4 } ); // "Line"
|
||||
EXPECT_EQ( 1ul, rects.size() );
|
||||
if ( !rects.empty() ) {
|
||||
EXPECT_EQ( 0, rects[0].Top );
|
||||
@@ -1220,7 +1220,7 @@ UTEST( FontRendering, TextSelection ) {
|
||||
{
|
||||
// "Line 1\nLine 2" -> Indices: "Line 1" (0-5), "\n" (6), "Line 2" (7-12)
|
||||
// Select from index 2 ("n" in "Line 1") to index 9 ("i" in "Line 2")
|
||||
std::vector<Rectf> rects = text.getSelectionRects( 2, 9 );
|
||||
std::vector<Rectf> rects = text.getSelectionRects( { 2, 9 } );
|
||||
EXPECT_EQ( 2ul, rects.size() );
|
||||
if ( rects.size() >= 2 ) {
|
||||
// First line rect: From index 2 to end of line 1
|
||||
@@ -1235,7 +1235,8 @@ UTEST( FontRendering, TextSelection ) {
|
||||
|
||||
// Test 3: Full selection
|
||||
{
|
||||
std::vector<Rectf> rects = text.getSelectionRects( 0, txt.size() );
|
||||
std::vector<Rectf> rects =
|
||||
text.getSelectionRects( { 0, static_cast<Int64>( txt.size() ) } );
|
||||
EXPECT_EQ( 3ul, rects.size() );
|
||||
}
|
||||
|
||||
@@ -1250,7 +1251,8 @@ UTEST( FontRendering, TextSelection ) {
|
||||
|
||||
EXPECT_GT( text.getVisualLineCount(), (Uint32)1 );
|
||||
|
||||
std::vector<Rectf> rects = text.getSelectionRects( 0, text.getString().size() );
|
||||
std::vector<Rectf> rects =
|
||||
text.getSelectionRects( { 0, static_cast<Int64>( text.getString().size() ) } );
|
||||
EXPECT_EQ( (size_t)text.getVisualLineCount(), rects.size() );
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user