translucency

Translucent QWidget should be clickable cross-os

谁说胖子不能爱 提交于 2021-01-29 03:36:34
问题 I'm trying to accomplish the following with a Qt (C++) app, cross OS. Upon running the program a new window pops up, a fullscreen QWidget. Now I want this to be see-through/transparent, so the user won't actually see it. On this 'layer' a user can drag his/her mouse to draw a (red) rectangle to select an area which is - when the mouse is released - taken a screenshot of. The problem: The issue lays in the whole transparent layer thing since this doesn't appear to work well cross OS. Because

Swing: hovering mouse over radio button label on translucent JPanel

≯℡__Kan透↙ 提交于 2020-01-14 08:37:25
问题 In my problem I have an opaque JPanel and another JPanel that is translucent(semi-transparent) which sits on the first JPanel. When I have added radio buttons onto the top JPanel. The problem is every time I enter mouse over the area of the label of each radio button(and every time I move mouse away from the label), it gets darker and darker. package trial; import java.awt.Color; import javax.swing.ButtonGroup; import javax.swing.JFrame; import javax.swing.JPanel; import javax.swing

Getting unexpected output from the swing program

我们两清 提交于 2020-01-06 09:03:29
问题 In the following code why i'm getting an invisible window?What does setUndecorated() do and where it is used for. import java.awt.Color; import java.awt.Dimension; import java.awt.Toolkit; import javax.swing.JFrame; import javax.swing.SwingUtilities; public class UsingJLayer { UsingJLayer() { JFrame jfrm=new JFrame("Picasa Viewer"); jfrm.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); Dimension dim=Toolkit.getDefaultToolkit().getScreenSize(); jfrm.setSize(dim); jfrm.setUndecorated(true); jfrm

Transparent AWT component, possible?

折月煮酒 提交于 2019-12-24 21:13:39
问题 I'm in the need of a translucent AWT component/container to be placed on top of other components to receive the mouse events. The problem here is to create a translucent component. My investigation so far showed that Swing has the possiblity to do setOpaque(false) on e.g. a JPanel. Is there something similiar for AWT? The idea is to make a ScrollPane scrollable by simply clicking somewhere and moving the mouse around. Thats why I need a transparent component to place it above all other

How to play a video on a translucent QWidget?

怎甘沉沦 提交于 2019-12-24 00:45:22
问题 I want to play a movie on a QWidget that has Qt::FramelessWindowHint flag and Qt::WA_TranslucentBackground attirbute using QVideoWidget or QGraphicsVideoItem. But the video is not visible. I hear only sound. What is the problem? Edit: #include "videoplayer.h" #include <QtWidgets/QApplication> #include "qboxlayout.h" #include "qvideowidget.h" int main(int argc, char *argv[]) { QApplication app(argc, argv); QWidget *w = new QWidget; w->setWindowFlags(Qt :: Window | Qt::FramelessWindowHint ); w-

iOS 7 navbar colours not showing properly on iPhone 4

[亡魂溺海] 提交于 2019-12-23 13:21:00
问题 My navigation bar colours appear normally in iOS 7 Deploying iOS 6.0, but if the system version is iOS 7.0 or later, some of the navigation bar colouring doesn't display properly on iPhone 4. Works fine in iPhone 5. Here's how I am doing it: if (SYSTEM_VERSION_GREATER_THAN_OR_EQUAL_TO(@"7.0")) { self.edgesForExtendedLayout = UIRectEdgeNone; [self.navigationController.navigationBar setBarTintColor:[UIColor blueColor]]; [self.navigationController.navigationBar setTranslucent:YES]; } #define

Translucent Status Bars (iPhone/iPad/iPod Touch)

烂漫一生 提交于 2019-12-21 17:04:54
问题 I've been looking around and it seems like the answer is no, but the posts are dated so I was wondering if this has changed. Is it possible to set the status bar to translucent? I'm trying to do a fade-in/fade-out effect on a multitouch tap but the status bar keeps coming up as solid black. Thanks! -- edit -- The code I'm using for the event transition is below. I have set the statusbar to translucent in the -info.plist, but I noticed there's no Black Translucent setting in IB (which is

How to make a rectangle in Graphics in a transparent colour?

杀马特。学长 韩版系。学妹 提交于 2019-12-21 06:58:05
问题 I'm trying to paint a rectangle on my application in a red shade but I need to make it sort of transparent so that the component under it will still show. However I still want that some colour will still show. The method where I'm drawing is the following: protected void paintComponent(Graphics g) { if (point != null) { int value = this.chooseColour(); // used to return how bright the red is needed if(value !=0){ Color myColour = new Color(255, value,value ); g.setColor(myColour); g.fillRect

Navigation bar becomes transparent when set to translucent

自闭症网瘾萝莉.ら 提交于 2019-12-20 02:54:58
问题 I'm using XCode 5.02 and iOS7 SDK. I'm trying to set my navigation bars as translucent but when I do that, they become completely transparent instead. The status bar will also be transparent. I can see the title and buttons on the navigation bar but no background. The same happens in all view controllers in my project, so this is not bound to specific view. When I set translucent = NO, I get solid colors. This is both in the simulator and on a device running iOS7. I have tried setting

To have a transluscent background for an android activity?

ぐ巨炮叔叔 提交于 2019-12-18 18:08:32
问题 I wish to have a transluscent background for an activity, so that the previous activity can be seen beneath this activity. Something like a transluscent menu that pops up over a videa being played in the background. Is this possible? Can you tell me how? Note:I cannot use the default transluscent theme from android, since I am using my own customised background and theme for my application. Pls help. Below is my style.xml wherein my_btn and my_list are selectors : <?xml version="1.0" encoding