소스 검색

LibGUI: Use logical `and` instead of bitwise in `Button` paint call

This appears to have been a typo. While it does work it's probably
better to be more clear here.
ForLoveOfCats 3 년 전
부모
커밋
1fd16232d3
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      Userland/Libraries/LibGUI/Button.cpp

+ 1 - 1
Userland/Libraries/LibGUI/Button.cpp

@@ -57,7 +57,7 @@ void Button::paint_event(PaintEvent& event)
 
     bool paint_pressed = is_being_pressed() || (m_menu && m_menu->is_visible());
 
-    Gfx::StylePainter::paint_button(painter, rect(), palette(), m_button_style, paint_pressed, is_hovered(), is_checked(), is_enabled(), is_focused(), is_default() & !another_button_has_focus());
+    Gfx::StylePainter::paint_button(painter, rect(), palette(), m_button_style, paint_pressed, is_hovered(), is_checked(), is_enabled(), is_focused(), is_default() && !another_button_has_focus());
 
     if (text().is_empty() && !m_icon)
         return;