mirror of
				https://github.com/kovidgoyal/calibre.git
				synced 2025-11-04 03:27:00 -05:00 
			
		
		
		
	Add an option to disable tooltips in the Tag browser (Preferences->Look & feel->Tag browser)
This commit is contained in:
		
							parent
							
								
									80599a0425
								
							
						
					
					
						commit
						7f22be365c
					
				@ -149,6 +149,7 @@ def create_defs():
 | 
			
		||||
    defs['emblem_position'] = 'left'
 | 
			
		||||
    defs['metadata_diff_mark_rejected'] = False
 | 
			
		||||
    defs['tag_browser_show_counts'] = True
 | 
			
		||||
    defs['tag_browser_show_tooltips'] = True
 | 
			
		||||
    defs['row_numbers_in_book_list'] = True
 | 
			
		||||
    defs['hidpi'] = 'auto'
 | 
			
		||||
    defs['tag_browser_item_padding'] = 0.5
 | 
			
		||||
 | 
			
		||||
@ -398,6 +398,7 @@ class ConfigWidget(ConfigWidgetBase, Ui_Form):
 | 
			
		||||
        r('row_numbers_in_book_list', gprefs)
 | 
			
		||||
        r('tag_browser_old_look', gprefs)
 | 
			
		||||
        r('tag_browser_hide_empty_categories', gprefs)
 | 
			
		||||
        r('tag_browser_show_tooltips', gprefs)
 | 
			
		||||
        r('bd_show_cover', gprefs)
 | 
			
		||||
        r('bd_overlay_cover_size', gprefs)
 | 
			
		||||
        r('cover_grid_width', gprefs)
 | 
			
		||||
 | 
			
		||||
@ -931,14 +931,14 @@ then the tags will be displayed each on their own line.</string>
 | 
			
		||||
         </property>
 | 
			
		||||
        </widget>
 | 
			
		||||
       </item>
 | 
			
		||||
       <item row="10" column="0" colspan="2">
 | 
			
		||||
       <item row="11" column="0" colspan="2">
 | 
			
		||||
        <widget class="QCheckBox" name="opt_tag_browser_old_look">
 | 
			
		||||
         <property name="text">
 | 
			
		||||
          <string>Use &alternating row colors in the Tag browser</string>
 | 
			
		||||
         </property>
 | 
			
		||||
        </widget>
 | 
			
		||||
       </item>
 | 
			
		||||
       <item row="11" column="0" colspan="2">
 | 
			
		||||
       <item row="12" column="0" colspan="2">
 | 
			
		||||
        <widget class="QCheckBox" name="opt_tag_browser_hide_empty_categories">
 | 
			
		||||
         <property name="toolTip">
 | 
			
		||||
          <string>When checked, calibre will automatically hide any category
 | 
			
		||||
@ -972,7 +972,7 @@ if you never want subcategories</string>
 | 
			
		||||
         </property>
 | 
			
		||||
        </widget>
 | 
			
		||||
       </item>
 | 
			
		||||
       <item row="8" column="0">
 | 
			
		||||
       <item row="9" column="0">
 | 
			
		||||
        <widget class="QCheckBox" name="opt_show_avg_rating">
 | 
			
		||||
         <property name="text">
 | 
			
		||||
          <string>Show &average ratings in the Tag browser</string>
 | 
			
		||||
@ -982,7 +982,7 @@ if you never want subcategories</string>
 | 
			
		||||
         </property>
 | 
			
		||||
        </widget>
 | 
			
		||||
       </item>
 | 
			
		||||
       <item row="9" column="0" colspan="2">
 | 
			
		||||
       <item row="10" column="0" colspan="2">
 | 
			
		||||
        <widget class="QCheckBox" name="opt_tag_browser_show_counts">
 | 
			
		||||
         <property name="toolTip">
 | 
			
		||||
          <string>Show counts for items in the Tag browser. Such as the number of books
 | 
			
		||||
@ -1026,6 +1026,13 @@ see the counts by hovering your mouse over any item.</string>
 | 
			
		||||
         </property>
 | 
			
		||||
        </widget>
 | 
			
		||||
       </item>
 | 
			
		||||
       <item row="8" column="0">
 | 
			
		||||
        <widget class="QCheckBox" name="opt_tag_browser_show_tooltips">
 | 
			
		||||
         <property name="text">
 | 
			
		||||
          <string>Show &tooltips in the Tag browser</string>
 | 
			
		||||
         </property>
 | 
			
		||||
        </widget>
 | 
			
		||||
       </item>
 | 
			
		||||
      </layout>
 | 
			
		||||
     </widget>
 | 
			
		||||
     <widget class="QWidget" name="cover_browser_tab">
 | 
			
		||||
 | 
			
		||||
@ -173,7 +173,7 @@ class TagTreeItem(object):  # {{{
 | 
			
		||||
        if role == Qt.FontRole:
 | 
			
		||||
            return bf()
 | 
			
		||||
        if role == Qt.ToolTipRole:
 | 
			
		||||
            return self.tooltip
 | 
			
		||||
            return self.tooltip if gprefs['tag_browser_show_tooltips'] else None
 | 
			
		||||
        if role == DRAG_IMAGE_ROLE:
 | 
			
		||||
            self.ensure_icon()
 | 
			
		||||
            return self.icon_state_map[0]
 | 
			
		||||
@ -199,6 +199,7 @@ class TagTreeItem(object):  # {{{
 | 
			
		||||
                self.ensure_icon()
 | 
			
		||||
            return self.icon_state_map[tag.state]
 | 
			
		||||
        if role == Qt.ToolTipRole:
 | 
			
		||||
            if gprefs['tag_browser_show_tooltips']:
 | 
			
		||||
                tt = [self.tooltip] if self.tooltip else []
 | 
			
		||||
                if tag.original_categories:
 | 
			
		||||
                    tt.append('%s:%s' % (','.join(tag.original_categories), tag.original_name))
 | 
			
		||||
@ -214,6 +215,7 @@ class TagTreeItem(object):  # {{{
 | 
			
		||||
                if self.type == self.TAG:
 | 
			
		||||
                    tt.append(_('Number of books: %s') % self.item_count)
 | 
			
		||||
                return '\n'.join(tt)
 | 
			
		||||
            return None
 | 
			
		||||
        if role == DRAG_IMAGE_ROLE:
 | 
			
		||||
            self.ensure_icon()
 | 
			
		||||
            return self.icon_state_map[0]
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user