Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 323904

Summary: Linestyle option Indent not working with Center alignment on Linux
Product: [Eclipse Project] Platform Reporter: Vishal Kothari <vishal.kothari212>
Component: SWTAssignee: Platform-SWT-Inbox <platform-swt-inbox>
Status: CLOSED WONTFIX QA Contact:
Severity: normal    
Priority: P3 CC: ericwill, Michael_Rennie
Version: 4.0Keywords: triaged
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Whiteboard: stalebug

Description Vishal Kothari CLA 2010-08-29 07:51:37 EDT
Build Identifier: Eclipse galileo 3.5.2

Hi,
We were using styled text widget and setting center alignment. After setting center alignment, the indentation does not work on Linux platform. It works fine on Windows. We are using Ubuntu 9.10

Below is the code fragment that can be used to reproduce this error

import org.eclipse.swt.SWT;
import org.eclipse.swt.custom.StyledText;
import org.eclipse.swt.layout.FillLayout;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Shell;

public class StyledTextIndentAlignmentJustify {

  static String text = "The first paragraph.";

  public static void main(String[] args) {
    Display display = new Display();
    Shell shell = new Shell(display);
    shell.setLayout(new FillLayout());
    StyledText styledText = new StyledText(shell, SWT.WRAP | SWT.BORDER);
    styledText.setText(text);
    styledText.setLineIndent(0, 1, 100);
    styledText.setLineAlignment(0, 1, SWT.CENTER);

    shell.setSize(700, 400);
    shell.open();
    while (!shell.isDisposed()) {
      if (!display.readAndDispatch())
        display.sleep();
    }
    display.dispose();
  }
}

Reproducible: Always

Steps to Reproduce:
1.Please run the attached code
Comment 1 Eric Williams CLA 2018-05-15 14:59:22 EDT
Still reproducible on GTK3.22, 4.8 M7, and Fedora 28.
Comment 2 Eclipse Genie CLA 2020-06-16 17:29:30 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. As such, we're closing this bug.

If you have further information on the current state of the bug, please add it and reopen this bug. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.