Announcement

Collapse
No announcement yet.

Kubuntu 22.04 - The EDITBOXes and COMBOBOXes don’t have a border

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Kubuntu 22.04 - The EDITBOXes and COMBOBOXes don’t have a border

    Hello,
    I write programs for Linux. These are my own mini apps that I write for myself and they are open source as well.

    I like the Application Style = Oxygen
    (System Settings -> Appearance -> Application Style = Oxygen)



    The buttons, checkboxes, multiline editboxes, radio buttons look fine.

    EDITBOXes and COMBOBOXes don’t have a border and this is annoying.
    I can’t add it programmatically since it is too complicated.

    I attached a screen shot.

    One of my programs is here:
    https://sourceforge.net/projects/youtubecomment/

    The Breeze look, the Fusion look, the MS Windows 9x are ok.
    Attached Files
    Last edited by vanadiumboy; Jul 09, 2022, 04:10 PM.

    #2
    For what it is worth, oxygen is not even an option for application style on my machine. Only Breeze, Fusion, Mswin9x. I have not added or removed anything there, that is the defaults on my install. Is it possible that Oxygen Plasma Style is not being maintained to work well with the latest plasma/QT releases? I know it was originally created for Plasma 4.0 and older versions of QT. That being said, I do remember MSwin9x on KDE 2/3. I am sure that has been modified to work with the newer releases of Plasma. What about Oxygen Application Style? I do have Oxygen in plasma style, but not application style.

    Comment


      #3
      It may not be installed by default.
      The application style
      is called kde-style-oxygen-qt5
      There is a full theme called plasma-theme-oxygen

      But I am going to guess the OP may need to make some code changes to reflect any recent changes to the application style, perhaps?

      Using the oxygen application style here on Plasma 5.25, combo boxes seem to look normal everywhere, except for this app
      . Click image for larger version

Name:	Screenshot_20220709_%Nd.png
Views:	191
Size:	126.9 KB
ID:	664112





      Comment


        #4
        Originally posted by rab0171610 View Post
        For what it is worth, oxygen is not even an option for application style on my machine. Only Breeze, Fusion, Mswin9x. I have not added or removed anything there, that is the defaults on my install. Is it possible that Oxygen Plasma Style is not being maintained to work well with the latest plasma/QT releases? I know it was originally created for Plasma 4.0 and older versions of QT. That being said, I do remember MSwin9x on KDE 2/3. I am sure that has been modified to work with the newer releases of Plasma. What about Oxygen Application Style? I do have Oxygen in plasma style, but not application style.
        That’s weird.
        It has always come with my Kubuntu (18.04, 20.04, 21.10, 22.04).
        Maybe you chose not to install a package or you uninstalled something and along with it, the Oxygen Application style was removed? I don’t know.

        Yes, in Plasma style, there is Oxygen. This seems to givet the task bar and menu a Windows Vista Aero look.

        Comment


          #5
          Even if I call
          EDITCopyCharacterCount->setFrame(true);

          the OS does not render a frame for that single line EDITBOX (class QLineEdit).

          I’m not sure why only single line edit boxes and combo boxes are effected and only under Oxygen style.

          I tried Stylesheets for a while. Forget it. That API is too much of a hassle. It also does not respect the look that the user wants if I use Stylesheets.

          The code with Stylesheets would look like
          EDITCopyCharacterCount->setStyleSheet(pStyle_String);

          and it takes a string as an argument. Some insane string.
          Also, there is no GetStyleSheet() so that I can check what the OSes setup is.

          Comment


            #6
            You might also consider poking around at a more KDE-centric place, which might have more people with programming and development knowledge. Maybe KDE's forums, Reddit, or telegram/irc/matrix chat rooms, as well as mailing lists.
            Sometimes you have to look under rocks to find the programmers/devs lol.

            Comment


              #7
              The Breeze look, the Fusion look, the MS Windows 9x are ok
              What I was implying is that the code seems to be working fine everywhere, but seems to be an issue only with the Oxygen application style. That would be where I would start looking for answers. I know this is a bit outdated and is someone trying to remove the borders from the combo box rather than add it (false rather than true):
              myLineEdit->setFrame( false );
              In your code is true obviously . . .
              https://stackoverflow.com/questions/...r-of-qlineedit
              Reading that, I think the problem lies with the oxygen theme itself and not your code. How you would keep that one particular theme from discarding the code to draw a frame I do not have a clue. Good luck!

              Comment


                #8
                I have other fish to fry, so I am going to leave it as it is.

                Comment


                  #9
                  The code with Stylesheets would look like
                  EDITCopyCharacterCount->setStyleSheet(pStyle_String);
                  Code:
                  EDITCopyCharacterCount->setStyleSheet("border: 1px solid red");
                  When you have time to come back to it . . . .
                  Maybe try that and increment the 1px to 2, 3, 4 etc and change color to black for example. See what that does in the different themes and check if explicitly setting the frame size and color this way affects the Oxygen style specifically? Sorry if that is not helpful.

                  Comment


                    #10
                    Yes, I did something like that and it does place a border.
                    The thing is that you are now customizing the look of your app from the application instead of letting the OS theme apply. That’s bad.

                    The solution might be to derive the main window from QDialog rather than QWindow.

                    For example, from Discover, download Multiwriter.
                    The title bar looks thick and the minimize, maximize, close buttons are totally different.
                    The open file dialog box looks different as well but this is because they have used GTK instead of Qt.

                    Comment


                      #11
                      A good place to ask if you have some code you want help with is:
                      https://stackoverflow.com/
                      Just be advised, I see a lot of posts there over the years about aspects in QT apps not drawing correctly under all themes and different themes displaying frames, for example, differently or not at all. Usually, they are advised to use style sheets to overcome the problem. Probably not what you want to hear, but you may find another solution.

                      Also, if you think this is unexpected behavior, you could contact the maintainers to inform them of the code and how it displays incorrectly in Oxygen. They might also have a suggestion:
                      https://github.com/KDE/oxygen
                      Last edited by rab0171610; Jul 14, 2022, 05:33 PM.

                      Comment

                      Working...
                      X