styling

Qt QListWidgetItem Multiple Lines

Deadly 提交于 2019-11-30 10:49:28
I have a really simple QListWidget object and I want to build a folder list. When I add an item to my list here is what I do : void LessCC::on_addFolderButton_clicked() { QString dirName = QFileDialog::getExistingDirectory(this, tr("Choose Directory"), QDir::homePath(), QFileDialog::ShowDirsOnly); QListWidgetItem* newItem = new QListWidgetItem(QIcon(":/resources/icons/folder.png"), dirName, 0, 0); this->ui->folderListWidget->addItem(newItem); } This is working but I want my items to have multiple lines or column of informations (with different style). I heard about the QStyledItemDelegate but

How do I style the ports of record based nodes in GraphViz?

三世轮回 提交于 2019-11-30 09:54:50
I'm feeding this simple input script defining record based nodes to dot in order to create a SVG from it (the SVG part actually doesn't matter): graph mygraph{ node [shape=record, fontsize=10, fontname=Arial]; rankdir=TB; ranksep=0.5; rank=max; splines=true; overlap=false; mindist=0.2; "d1" [style=solid, label="{\N|{<0> 0|<1> 1}}"]; "d2" [style=solid, label="{\N|{<0> 0|<1> 1|<2> 2|<3> 3}}"]; "d1":0 -- "d2":0[color=blue, penwidth=3, tooltip="d1:0 -- d2:0", URL="#"]; } This yields a graph where ports 0 of d1 and port 0 of d2 are connected by a blue spline: Fine. Now I have the need to colorize

Android ListView with complex header

南楼画角 提交于 2019-11-30 08:37:13
问题 I'm trying to add a complex / non-trivial header to a ListView (and slightly less complex footer) that needs to scroll along with the rest of the content. The header consists of a TextView with bold text, black transparent background and rounded corners a TextView with normal text, black transparent background an ImageView a clickable button (actually an ImageView with onClick) and a divider I'm familiar with addHeaderView, but if I try to add a complex view (consisting of a LinearLayout with

What is the best approach towards styling GWT applications?

一世执手 提交于 2019-11-30 07:09:29
General approach in GWT is to use Panels and then apply custom CSS themes to get a customized look. While I can achieve a certain extent of personalization of my GWT app through CSS tinkering, I was wondering how others generally approach styling. Some of the suggestions I came across the web were to manage layout with plain HTML, through use of HTMLPanel's. This way one can straightaway use the HTML mock-up within the application without having to code all the layout. So what in your opinion is the best and least painful way to approach layout and custom styling of GWT application? It all

Where can I get themes for WPF controls that resemble the Visual Studio 2010 interface?

倾然丶 夕夏残阳落幕 提交于 2019-11-30 06:38:33
问题 My application is build around AvalonDock, which has quite good Visual Studio 2010 skin (which is much prettier than all the other skins). Now I would like to style the rest of my application to go with it. I'm interested most in following parts: Toolbar - I mostly managed to get the colors right on my own, but the VS toolbars are still prettier. (Context)Menu - VS has the blue menu item focus box replaced with a nice orange one, which gives the application much warmer and friendlier feel.

WPF - Margin in percentage

|▌冷眼眸甩不掉的悲伤 提交于 2019-11-30 05:42:38
问题 I have just started using WPF. I'm getting my head around styling system since. I come from a CSS background and I would like to set margin in percentage. <Style TargetType="TextBlock" x:Key="workflowNameTextBlock"> <Setter Property="Margin" Value="50"/> </Style> Currently value is set in pixels, but I would like to set it in %, i.e. 50%. How can I achive this? Thank you 回答1: Here's how you implement 20% left and right margins in WPF: <Grid> <Grid.ColumnDefinitions> <ColumnDefinition Width="2

Print Stylesheets for pages with long horizontal tables

女生的网名这么多〃 提交于 2019-11-30 03:53:25
问题 I have a page that spits out db data in long horizontal tables. I need to print it nicely so it does not cut off. Any tips ? 回答1: If it doesn't fit on the paper in a readable font, it just doesn't.. In my opinion, huge horizontal tables (be it a HTML table or an Excel sheet with many columns) don't lend well to printing. For that matter, they don't lend well to viewing on a screen either. Remember vertical scrolling is much easier for your users than horizontal scrolling - all thanks to that

remove red rectangle around combobox

与世无争的帅哥 提交于 2019-11-29 23:54:47
i need to remove red rectangle around combobox. I have setup combobox in xaml like (below) this and i`m trying to override of the Validation.ErrorTemplate. <ComboBox x:Name="comboPodkategoria" Margin="0,3,0,0" IsSynchronizedWithCurrentItem="False" IsEditable="False" ItemsSource="{Binding Source={StaticResource PodKategoriaLookup}, UpdateSourceTrigger=PropertyChanged, ValidatesOnDataErrors=True}" SelectedValue="{Binding IDPodKategoria}" DisplayMemberPath="kat_popis" SelectedValuePath="IDPodkat" TabIndex="5" Style="{StaticResource combostyle}"> <Validation.ErrorTemplate> <ControlTemplate> <

Styling QML without manually marking each property to be styled

懵懂的女人 提交于 2019-11-29 23:49:43
I know that QML does not support CSS styling like widgets do, and I have read up on alternative approaches to styling/theming: https://qt-project.org/wiki/QmlStyling http://www.slideshare.net/BurkhardStubert/practical-qml-key-navigation/34 Common for these approaches is that they require the developer to specify the parts of the QML that can be styled, either by binding to a property in a “styling QML file/singleton”, or by using a Loader to load a different QML component based on style name. What I would like is something that works like the "id" selector in CSS instead of the "class"

How can I make an Upvote/Downvote button?

落花浮王杯 提交于 2019-11-29 23:03:22
This is just for the styling, I'm trying to make an upvote/downvote the same way that it's done on SO and Reddit, from what I can see they use arrow images as backgrounds and then position it, but I'm a CSS newbie and I need someone to walk me through it. Thanks in advance. You could do it by adding a different picture to the background, one for every state of the button. There is however a cleaner, easier, more modern way of achieving this result: Sprites. A sprite is an image that is saved as a part of a larger image. One of the biggest advantages of using sprites is the reduction of round