GtkProxyStyle::GtkProxyStyle(ScrollbarType sb) : QProxyStyle() #ifdef ENABLE_OVERLAYSCROLLBARS , sbarThumb(0) , sbarWidth(-1) , sbarAreaWidth(-1) , sbarOffset(0xffffffff) , sbarLastPos(-1) , sbarThumbTarget(0) #endif { shortcutHander=new ShortcutHandler(this); sbarType=sb; if (SB_Standard!=sbarType) { QByteArray env=qgetenv("LIBOVERLAY_SCROLLBAR"); if (!env.isEmpty() && env!="1") { sbarType=SB_Standard; } } setBaseStyle(qApp->style()); toolbarCombo=new QComboBox(new QToolBar()); if (SB_Standard!=sbarType) { int fh=QApplication::fontMetrics().height(); sbarPlainViewWidth=fh/1.75; #ifdef ENABLE_OVERLAYSCROLLBARS if (SB_Overlay==sbarType && Qt::LeftToRight==QApplication::layoutDirection()) { // && revertQGtkStyleOverlayMod()) { sbarWidth=qMax(fh/5, 3); sbarAreaWidth=sbarWidth*6; sbarThumb=new OsThumb(); sbarThumb->setVisible(false); connect(sbarThumb, SIGNAL(thumbDragged(QPoint)), SLOT(sbarThumbMoved(QPoint))); connect(sbarThumb, SIGNAL(pageUp()), SLOT(sbarPageUp())); connect(sbarThumb, SIGNAL(pageDown()), SLOT(sbarPageDown())); connect(sbarThumb, SIGNAL(hiding()), SLOT(sbarThumbHiding())); connect(sbarThumb, SIGNAL(showing()),SLOT(sbarThumbShowing())); } #endif } }
void DesktopMenu::_onshow() { showing(); }