git-svn-id: svn://db.shs.com.ru/libs@467 a8b55f48-bf90-11e4-a774-851b48703e85
This commit is contained in:
@@ -40,7 +40,7 @@ void BlockView::_init() {
|
||||
thumb_hide_delay = 500;
|
||||
timer_thumb = 0;
|
||||
smode = BlockView::MultiSelection;
|
||||
cur_scl = thumb_scl = 1.;
|
||||
cur_scl = thumb_scl = prev_app_scale = 1.;
|
||||
_talpha = 0.;
|
||||
ae_enabled = is_nav_anim = is_block_anim = true;
|
||||
nav_prev_aa = nav_prev_imaa = nav_prev_grid = true;
|
||||
@@ -139,6 +139,16 @@ void BlockView::_updateBack() {
|
||||
}
|
||||
|
||||
|
||||
bool BlockView::event(QEvent * e) {
|
||||
if (e->type() == QEvent::FontChange || e->type() == QEvent::Polish) {
|
||||
double cscl = appScale(this);
|
||||
QGraphicsView::scale(cscl / prev_app_scale, cscl / prev_app_scale);
|
||||
prev_app_scale = cscl;
|
||||
}
|
||||
return QGraphicsView::event(e);
|
||||
}
|
||||
|
||||
|
||||
bool BlockView::eventFilter(QObject * o, QEvent * e) {
|
||||
if (o == &widget_thumb) {
|
||||
QMouseEvent * me = (QMouseEvent*)e;
|
||||
@@ -1873,7 +1883,7 @@ void BlockView::zoom(double factor) {
|
||||
|
||||
void BlockView::zoomReset() {
|
||||
cur_scl = qSqrt(transform().determinant());
|
||||
zoom(1. / cur_scl);
|
||||
zoom(prev_app_scale / cur_scl);
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user