Is it possible to change firefox's maximize button position in windows?

Jichao

I want to change the order of the minmize/resize/maximize button of firefox, but do not know how to do it.

It seems userchrome.css does not help.

Could I customize it?

Jichao

Yes it is possible to change the order of the three title buttons while the DWM is disabled. But if the DWM is enabled, we are not able to change the order.

Method:

1) copy omni.ja from C:\Program Files (x86)\Mozilla Firefox\browser

2) extract it with your zip tools

3) edit browser.xul under chrome\browser\content\browser, change the order of following content

<hbox id="titlebar-buttonbox-container" align="start">
      <hbox id="titlebar-buttonbox">
        <toolbarbutton class="titlebar-button" id="titlebar-close" command="cmd_closeWindow"/>
        <toolbarbutton class="titlebar-button" id="titlebar-max" oncommand="onTitlebarMaxClick();"/>
        <toolbarbutton class="titlebar-button" id="titlebar-min" oncommand="window.minimize();"/>
      </hbox>

the order of titlebar becomes: close->max->minimized

4) repack the omni.ja with command zip -qr9XD omni.ja * under the omni directory.

5) replace the old omni.ja with the new edited omni.ja

6) the finally result: enter image description here

Explanation:

1) Firefox's ui layout is based on xul(a xml based layout description language) and browser.xul is used as the description file for the main browser ui.

2) While DWM is enabled, Firefox draws the non-client area using the default window proc(DefWindowProc),

case WM_NCPAINT:
    {
      /*
       * Reset the non-client paint region so that it excludes the
       * non-client areas we paint manually. Then call defwndproc
       * to do the actual painting.
       */

      if (!mCustomNonClient)
        break;

      // let the dwm handle nc painting on glass
      if(nsUXThemeData::CheckForCompositor())
        break;

      HRGN paintRgn = ExcludeNonClientFromPaintRegion((HRGN)wParam);
      LRESULT res = CallWindowProcW(GetPrevWindowProc(), mWnd,
                                    msg, (WPARAM)paintRgn, lParam);
      if (paintRgn != (HRGN)wParam)
        DeleteObject(paintRgn);
      *aRetValue = res;
      result = true;
    }
    break;

So it is impossible to customize the three button while dwm is enabled.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

Is it possible to change icon's position on FAB?

Is it possible to change the vertical position of cancel button in the search bar?

Is it possible to change a button's text in TinyMCE at runtime?

change button position in formPanel

Change image position with Button

How to change button position?

Is it possible to change the color of a QSlider's handle according to its position?

Change position of Google Maps API's "My location" button

How to find the button on the entered position by user and change it's color in pygame?

background-image change button's default style in Firefox

How to maximize logcat's windows on android studio?

FVWM 's Windows buttons (Maximize Minimize ...), Themes

Is it possible to change wx.Button's label text colour

Is it possible to change the color of selected radio button's center circle

Is it possible to change the application opened by the Surface Pro 3's pen button?

Is it possible to change the ARKit scene's object when clicking on a button Swift

how to design a custom close, minimize and maximize button in windows form application?

How to change button control position?

Swift Change button position with AutoLayout

Change button position in HTML & CSS?

Need to dynamically change position for button

Change submit button position in form

Change position of attributed title in button

Change the position of microphone button in BigBlueBotton

Why is position of html button in tablecell different in Firefox

No maximize button on XLib window

Electron - maximize button

Enable maximize button in QWizard

Is it possible to customize the "Done" Button and bar position of the InAppBrowser?