highlighting

how to change Qt qListView Icon selection highlight

我只是一个虾纸丫 提交于 2021-02-18 11:17:06
问题 When using qlistview in icon mode I need to completely remove the hilighting when a icon is selected. Using the code below the text under the icon is no longer highlighted but I still get blue color over the icon when selected QString stylesheet = ""; stylesheet += "QListView::item:alternate {background-image: transparent; background-color: transparent;}"; stylesheet += "QListView::item:selected {background-image: transparent; background-color: transparent;padding: 0px;color: black;}";

How do I set different colors for text and underline in JTextPane?

杀马特。学长 韩版系。学妹 提交于 2021-02-07 14:16:58
问题 Just been trying to color the text in JTextPane - but the issue is cannot have different colors for text and the underline. How should I do that or is that even possible? The example below prints all the text and underline in RED. JTextPane pane = new JTextPane(); StyleContext context = new StyleContext(); Style style = pane.addStyle("Black", null); StyleConstants.setAlignment(style, StyleConstants.ALIGN_RIGHT); StyleConstants.setFontSize(style, 14); StyleConstants.setSpaceAbove(style, 4);

Selection and highlighting of text in iphone/ipad web browser safari not working

♀尐吖头ヾ 提交于 2021-02-07 10:20:31
问题 Possible duplicate: Change CSS of selected text using Javascript I tried the code from above link but not getting the result for iPad browser to highlight the selected text. function makeEditableAndHighlight(colour) { var range, sel = window.getSelection(); if (sel.rangeCount && sel.getRangeAt) { range = sel.getRangeAt(0); } document.designMode = "on"; if (range) { sel.removeAllRanges(); sel.addRange(range); } // Use HiliteColor since some browsers apply BackColor to the whole block if (

How to improve git's diff highlighting?

喜你入骨 提交于 2020-04-04 08:50:51
问题 The output of git diff is optimized for code which tends to be one statement per line whereas text can (if authors like me are too lazy to use line breaks) cause diff output which is very hard to read and more of a "Where's Wally?" search than reading diff output whereas highlighting as done on GitLab's or GitHub's web frontend shows the difference immediately I'm aware that I'm comparing HTML and plain text (apples and oranges), however it should be possible to improve the git diff output by

Is there any way to highlight multiple searches in (g)Vim?

本小妞迷上赌 提交于 2020-01-27 03:22:05
问题 I want to search for multiple strings in Vim/gVim and have them highlighted in different colours. Is there a way of doing this with out-the-box Vim or with a plug-in? 回答1: Try "Highlight multiple words", which uses matchadd() . 回答2: There are two simple ways to highlight multiple words in vim editor. Go to search mode i.e. type ' / ' and then type \v followed by the words you want to search separated by ' | ' (pipe). Ex: /\vword1|word2|word3 Go to search mode and type the words you want to

Visual Studio keyword highlighting in comments

若如初见. 提交于 2020-01-25 07:58:25
问题 Is there any way to highlight certain keywords like TODO in comments? I used to this feature in vim but can't find a way to do the same job in Visual Studio 2008. 回答1: If you use ReSharper with Visual Studio, any comment with TODO or NOTE can be highlighted in a different colour. 来源: https://stackoverflow.com/questions/1714558/visual-studio-keyword-highlighting-in-comments

Customizing emacs syntax coloring

萝らか妹 提交于 2020-01-24 21:25:05
问题 I can't figure out how to set emacs to use just two colors, one for comments and the other for the regular code across all language modes. There is, of course the possibility to set the colors of each block except comment to the second color, but I'm not sure what ALL available blocks are. Until now all I found is (setq-default global-font-lock-mode nil) but this also kills coloring for comments. I guess this must be fairly easy for time-proven emacs warriors. 回答1: See the angry fruit salad

Limiting a match in vim to certain filetypes?

若如初见. 提交于 2020-01-21 10:57:08
问题 I have the following in my .vimrc to highlight lines longer than 80 chars: highlight OverLength ctermbg=red ctermfg=white guibg=#592929 match OverLength /\%81v.*/ This works quite well. However, the problem is that I would prefer it if it only worked on certain file types. Basically, any programming language should be highlighted and things like html, xml, and txt files should not be. I'm pretty sure I could do this easily with an autocmd, but I'm not sure if that is the best way to

Samsung Galaxy Tab 10.1 and -webkit-tap-highlight-color style?

大憨熊 提交于 2020-01-15 08:58:28
问题 I'm trying to turn off the default Android web 'highlighting' (the -webkit-tap-highlight-color style 'fix' that is recommended everywhere) - this works great on most devices, but not my Galaxy Tab 10.1 - anything with a 'click' handler, will always get highlighted in the default 'dark' colour when it is 'clicked' in the browser. eg. I have this in my CSS : * { -webkit-tap-highlight-color: rgba(0, 0, 0, 0); } then using jQuery setting up a 'click' hander on a div : < div id="test" >some kind

How highlight found word with Sunspot?

微笑、不失礼 提交于 2020-01-13 10:41:33
问题 I want to highlight found words in text, for example, as shown here. As far as I know I must follow these steps: 1) In my model, I must add :stored => true option to the field which I want to highlight: searchable do text :title, :stored => true text :description end 2) In my controller, I have to declare which field I want highlighted: def search @search = Article.search do keywords params[:search] do highlight :title end end end 3) In the view I'm not sure what to do, I tried this: -