Selection color disappears if listRowBackground changed - swiftui

If I change the row background color, then the default grey selection when I tap on the row disappears.
Is it possible to bring it back? Or do I have to add a custom overlay/manually change the color of the row when selected?
The code I used for changing the background color is the following: .listRowBackground(Color(.secondarySystemGroupedBackground))

Related

In chart.js , change color of chart by clicking button

In chart.js, is it possible to change the color of a chart (theme) by clicking a button?
Let's say I have buttons named 'dark mode', 'light mode' when I click 'dark mode' button, the chart color changes to dark color.
I can't find any example of it by googling.
You can make a new chart or update your chart with the new colors in the options or in your dataset. There's no function with changes all colors to a dark mode, you have to change all colors on your own.
I can't give you all the possible color options, there's simply too many. Just look at the docs or maybe here for a few examples. You can for sure change e.g. all the dataset and background colors.

How to move Filters Pane to the left from right in power-bi?

I have a Power-bi report created in Power-bi Desktop and embedded to my custom web page. The filters pane is on the right of the report by default. Is there a way to move it the left of the report instead? I could not find how to manage this.
Any help would be appreciated.
You can't move it to the other side. I'm guessing when this is pushed out to GA or at some point in the future it'll be an option, but currently this is all you can change on the Filter Pane:
Pane Options
Background color
Background transparency
Filter pane border on or off
Filter pane border color
Filter pane title and header font, color, and text size
Card Options
Background color
Background transparency
Border: on or off
Border color
Font, color, and text size
Input box color
Taken from here.

how to remove border or change border color of CHeaderCtrl (mfc)

How to remove border or change border color of CHeaderCtrl? In my case CHeaderCtrl is embedded in CListCtrl (we are not calling CHeaderCtrl::create explicitly from our code). I would like to remove this white border from header or would like to change the border color.

Color the Image setting on QProgressBar

Actually I set an image on a QProgressBar and want to change the color of image according to selected part of QProgressBar.
I tried covering my image with QProgressBar color but that fills the image, but as my image is not a rectangle it color the whole QProgressBar and not just the image.
Is it possible to change color of image only using qt (with C++)
You are looking for Qt Style Sheet Documentation. You can customize your own QProgressBar, and add your own setProgress() function which should update the value property. You could modify the image background, the border, margins... depending of the value of the current value.
See QSS examples for more detail: Example Style Sheet

How to set background and foreground color of QTableWidget row Vertical Header Item

I am trying to set the background and foreground color of a QTableWidgetItem that is a Vertical Header Item in a row of my QTableWidget. The following code does not work for a QTableWidgetItem that is a vertical header item, even though the same code works fine for a QTableWidgetItem that is a regular cell.
I'm using Qt 4.8 on Fedora 17 x64 Gnome 3.4
static const QBrush AddedCellBackground = Qt::yellow;
static const QBrush AddedCellForeground = Qt::red;
void rowSelected()
{
QTableWidgetItem *vertHeadItem = _getSelectedItemVerticalHeader();
vertHeadItem->setForeground( AddedCellForeground );
vertHeadItem->setBackground( AddedCellBackground );
}
This code makes no change when vertHeadItem is a vertical header item, but it has the desired affect when it is a regular cell. How can I set the background and foreground of a vertical header item?
I think you can easily target specific items by knowing it's "AccessibleName", you can try this:
QTableWidgetItem#YourAccessibleName {
/* style definitions */
}
In the question Is it possible to change the colour of a QTableWidget row label? about the same topic but for PyQt my solution was to get the QTableWidgetItem of the vertical header and set the background and foreground there, however only the foreground was changed, the background stayed a smooth gray gradient. Probably the style was overridding/ignoring the background. Specifying a different style (Cleanlooks for example) fixed it.
So add something like in the construction of the table widget
QTableWidget::verticalHeader().setStyle(QStyleFactory::create("CleanLooks"))