Skip to content

Commit

Permalink
opt: only change the font of translate line
Browse files Browse the repository at this point in the history
  • Loading branch information
xiaoyifang committed Dec 29, 2024
1 parent c5e81df commit 265b8f5
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/ui/mainwindow.cc
Original file line number Diff line number Diff line change
Expand Up @@ -3166,13 +3166,13 @@ void MainWindow::iconSizeActionTriggered( QAction * /*action*/ )
scanPopup->setDictionaryIconSize();

//adjust the font size as well
auto font = translateLine->font();
auto font = translateBox->translateLine()->font();
font.setWeight( QFont::Normal );
//arbitrary value to make it look good
font.setPixelSize( extent * 0.8 );
// translateBox->completerWidget()->setFont( font );
//only set the font in toolbar
translateLine->setFont( font );
translateBox->translateLine()->setFont( font );
}

void MainWindow::toggleMenuBarTriggered( bool announce )
Expand Down Expand Up @@ -3654,7 +3654,7 @@ void MainWindow::doWordsZoomBase()

void MainWindow::applyWordsZoomLevel()
{
QFont font = translateLine->font();
QFont font = translateBox->translateLine()->font();

int ps = getIconSize();

Expand All @@ -3665,7 +3665,7 @@ void MainWindow::applyWordsZoomLevel()

font.setPixelSize( ps * 0.8 );
font.setWeight( QFont::Normal );
translateLine->setFont( font );
translateBox->translateLine()->setFont( font );
// translateBox->completerWidget()->setFont( font );
wordsZoomBase->setEnabled( cfg.preferences.wordsZoomLevel != 0 );

Expand Down

0 comments on commit 265b8f5

Please sign in to comment.