Changeset 106651 in vbox
- Timestamp:
- Oct 24, 2024 10:57:35 AM (3 months ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src/logviewer
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/logviewer/UIVMLogViewerTextEdit.cpp
r106061 r106651 493 493 m_pLineNumberArea->setGeometry(QRect(cr.left(), cr.top(), lineNumberAreaWidth(), cr.height())); 494 494 } 495 496 if (m_pScrollToBottomLabel && m_pScrollToTopLabel) 497 { 498 QScrollBar *pVScrollBar = verticalScrollBar(); 499 QScrollBar *pHScrollBar = horizontalScrollBar(); 500 501 int iMarginX = 0; 502 if (pVScrollBar) 503 iMarginX = pVScrollBar->width(); 504 if (iMarginX == 0) 505 iMarginX = m_pScrollToBottomLabel->width(); 506 iMarginX += 2 * QApplication::style()->pixelMetric(QStyle::PM_FocusFrameHMargin); 507 int iMarginY = 0; 508 if (pHScrollBar) 509 iMarginY = pHScrollBar->height(); 510 if (iMarginY == 0) 511 iMarginY = m_pScrollToTopLabel->height(); 512 513 514 m_pScrollToBottomLabel->move(width() - iMarginX - m_pScrollToBottomLabel->width(), 495 repositionToBottomToUpButtons(); 496 } 497 498 void UIVMLogViewerTextEdit::repositionToBottomToUpButtons() 499 { 500 if (m_pScrollToBottomLabel && m_pScrollToTopLabel) 501 { 502 QScrollBar *pVScrollBar = verticalScrollBar(); 503 QScrollBar *pHScrollBar = horizontalScrollBar(); 504 QSize iconSize = m_pScrollToBottomLabel->pixmap().size(); 505 int iMarginX = 0; 506 if (pVScrollBar) 507 iMarginX = pVScrollBar->width(); 508 if (iMarginX == 0) 509 iMarginX = iconSize.width(); 510 iMarginX += 2 * QApplication::style()->pixelMetric(QStyle::PM_FocusFrameHMargin); 511 int iMarginY = 0; 512 if (pHScrollBar) 513 iMarginY = pHScrollBar->height(); 514 if (iMarginY == 0) 515 iMarginY = iconSize.height(); 516 517 m_pScrollToBottomLabel->move(width() - iMarginX - iconSize.width(), 515 518 0.5 * m_pScrollToBottomLabel->height()); 516 519 517 m_pScrollToTopLabel->move(width() - iMarginX - m_pScrollToTopLabel->width(),518 height() - iMarginY - 1.5 * m_pScrollToTopLabel->height());519 }520 m_pScrollToTopLabel->move(width() - iMarginX - iconSize.width(), 521 height() - iMarginY - 1.5 * iconSize.height()); 522 } 520 523 } 521 524 -
trunk/src/VBox/Frontends/VirtualBox/src/logviewer/UIVMLogViewerTextEdit.h
r106061 r106651 113 113 /** If bookmark exists this function removes it, if not it adds the bookmark. */ 114 114 void toggleBookmark(const UIVMLogBookmark& bookmark); 115 void repositionToBottomToUpButtons(); 115 116 116 117 UIVMLogBookmark m_iContextMenuBookmark;
Note:
See TracChangeset
for help on using the changeset viewer.