Gtk消息:加载模块"覆盖滚动条" 17.10失败

分享于 

3分钟阅读

ubuntu

  繁體

问题

我在基于Qt 5.5.1(GCC 4.9.1 20140922(Red Hat 4.9.1 -10),32位)的重新安装的Qt Creator 3.5.1(开源)中运行应用程序,并且构建成功。但出现警告:


Gtk-Message: Failed to load module"overlay-scrollbar"


(untitled01:20644): Gtk-WARNING **: Unable to locate theme engine in module_path:"pixmap",


(untitled01:20644): Gtk-WARNING **: Unable to locate theme engine in module_path:"pixmap",




答案1

这里有三个选项:

  • 忽略警告
  • 删除覆盖滚动条内容

    
    #Step 1
    
    
    echo"export GTK_OVERLAY_SCROLLING=0" >> ~/.profile
    
    
    
    #Step 2
    
    
    mkdir -p ~/.config/gtk-3.0
    
    
    cat <<EOF > ~/.config/gtk-3.0/gtk.css
    
    
    /* Adding the buttons on the edges (if you don't need them, skip the next 4 lines)
    
    
     */
    
    
    
    .scrollbar {
    
    
     -GtkScrollbar-has-backward-stepper: 1;
    
    
     -GtkScrollbar-has-forward-stepper: 1;
    
    
    }
    
    
    
    /* Scrollbar trough squeezes when cursor hovers over it. Disabling that
    
    
     */
    
    
    
    .scrollbar.vertical:hover:dir(ltr),
    
    
    .scrollbar.vertical.dragging:dir(ltr) {
    
    
     margin-left: 0px;
    
    
    }
    
    
    
    .scrollbar.vertical:hover:dir(rtl),
    
    
    .scrollbar.vertical.dragging:dir(rtl) {
    
    
     margin-right: 0px;
    
    
    }
    
    
    
    .scrollbar.horizontal:hover,
    
    
    .scrollbar.horizontal.dragging,
    
    
    .scrollbar.horizontal.slider:hover,
    
    
    .scrollbar.horizontal.slider.dragging {
    
    
     margin-top: 0px;
    
    
    }
    
    
    
    /* Slider widens to fill the scrollbar when cursor hovers over it. Making it permanent
    
    
     */
    
    
    
    .scrollbar.slider.vertical:dir(ltr):not(:hover):not(.dragging) {
    
    
     margin-left: 0px;
    
    
    }
    
    
    
    .scrollbar.slider.vertical:dir(rtl):not(:hover):not(.dragging) {
    
    
     margin-right: 0px;
    
    
    }
    
    
    
    .scrollbar.slider.horizontal:not(:hover):not(.dragging) {
    
    
     margin-top: 0px;
    
    
    }
    
    
    
    EOF
    
    
    
    #Step 3
    
    
    cat <<EOF > ~/.config/gtk-3.0/settings.ini
    
    
    [Settings]
    
    
    gtk-color-scheme="tooltip_bg_color:#ffffafntooltip_fg_color:#000000"
    
    
    gtk-application-prefer-dark-theme=0
    
    
    
    gtk-primary-button-warps-slider = false
    
    
    
    EOF
    
    
    
    #Step 4
    
    
    sudo apt-get purge overlay-scrollbar overlay-scrollbar-gtk2
    
    
    
    
  • 重新安装覆盖滚动条内容

    
    sudo apt-get install --reinstall overlay-scrollbar overlay-scrollbar-gtk2
    
    
    
    

  • 答案2

    在Ubuntu 16.04的电脑上,我解决了安装软件包overlay-scrollbar-gtk2

    
    sudo apt-get install --reinstall overlay-scrollbar-gtk2
    
    
    
    

    答案3

    在64位LTS18.04上,overlay-scrollbar-gtk2不能解决问题。 Failed to load module"overlay-scrollbaroverlay-scrollbar-gtk2:i386完成任务时,即:

    
    sudo apt-get install --reinstall overlay-scrollbar overlay-scrollbar-gtk2:i386
    
    
    
    


    模块  Ubuntu  Message  滚动  GTK  滚动条